INFO: Visual C++ 5.0 Readme, Sample Program IssuesLast reviewed: June 27, 1997Article ID: Q165691 |
The information in this article applies to:
SUMMARY
Sample Program IssuesNew Visual C++ 5.0 Samples Updated Samples ATL Samples COMMAP, CONNECT, and DRAWSERV Do Not Register Correctly When Path Contains Spaces CUSTOMWZ Sample Missing Files Get Sendtime and Settime Samples from the Compact Disc ATL CIRC Sample Fails in Some Containers ATLCON Sample Fails Under MinCRT Configurations ATLBUTTON Sample Returns Incorrect Property Values ATL POLYGON Sample Does Not Build in Release Mode Link Error in Debug Build of COM Sample acdual/mfcctrl Typo in tan and tanh Sample BINDENRL Sample Fails to Copy STDREG32.MDB Access Violation in Visual Basic 5 When Running COMEXCEL Sample Running OLE SDK Samples Running InOLE2 SDK Samples
MORE INFORMATIONThe samples on the first Visual C++ CD are accessible from any directory browser (Windows Explorer or File Manager, for example). Sample code remains available for viewing and download from sample abstracts in the documentation. New Visual C++ 5.0 Samples Try out the samples located in the \DEVSTUDIO\VC\SAMPLES directory of the first Visual C++ CD. These include examples of using the new compiler support for COM and samples for ATL. They also include a new Custom AppWizard sample.
Updated SamplesThe most recent versions of the following samples are in the DevStudio\Vc\Samples directory on the disc that includes "Microsoft Visual C++" on the label. (Disc 1 if you purchased Visual C++; Disc 3 if you purchased Visual Studio.) Do not use the versions that you can find in the InfoViewer's Samples abstracts. Instead, copy the files from the Microsoft Visual C++ disc to your hard drive.
MFC Samples
These ATL samples do not register correctly when their path contains spaces. Workaround Edit their corresponding .RGS files and add single quotes around all occurrences of %MODULE%. For example, you would change a line containing the following:
InprocServer32 = s %MODULE%to the following:
InprocServer32 = s '%MODULE%'NOTE: DRAWSERV is a sample program within the DCOM ATL sample.
CUSTOMWZ Sample Missing FilesThe CUSTOMWZ sample in the DevStudio\Vc\Samples\appwiz\ directory is missing some essential files. To obtain the entire sample, with all of its files, install it from the "CUSTOMWZ: A Custom AppWizard" topic in the online documentation. To find this topic, choose the Search command from the Help menu, enter the comma- delimited string, "CUSTOMWZ: A Custom AppWizard", on the Query tab, and then click the Query button.
Get Sendtime and Settime Samples From the Compact DiscThe files for the Sendtime and Settime samples downloaded from the Enterprise sample abstracts in the online documentation will not compile. Workaround Manually copy the correct files for these samples from the DevStudio\VC\Samples\Ent\time directory. This directory is on the disc that includes "Microsoft Visual C++" on the label. (Disc 1 if you purchased Visual C++; Disc 3 if you purchased Visual Studio.)
ATL CIRC Sample Fails in Some ContainersFor correct functionality in certain containers, objects passing properties must support the propputref semantics. The CIRC sample as installed from the online abstract supports propput instead of propputref. Therefore, you should use the CIRC sample from the DevStudio\Vc\Samples\Atl\circ directory. To see the correct propputref syntax, look in the Circ.idl file. This directory is on the disc that includes "Microsoft Visual C++" on the label. (Disc 1 if you purchased Visual C++; Disc 3 if you purchased Visual Studio.)
ATLCON Sample Fails Under MinCRT ConfigurationsTo successfully run the ATL sample, ATLCON, under a MinCRT configuration, you must remove the WinMain entry point as follows:
configurations.3. On the Link tab, choose the Output category. 4. Remove the text in the Entry-point symbol edit box.
ATLBUTTON Sample Returns Incorrect Property ValuesThe ATLBUTTON sample returns incorrect values for the properties ImageHover and ImagePush. To correct the sample change the file AtlButton.h so that the function get_ImageHover uses m_bstrFilename[1].Copy() and change get_ImagePush so that it uses m_bstrFilename[2].Copy().
ATL POLYGON Sample Does Not Build in Release ModeIf you copy the ATL POLYGON sample from the online documentation, it will not build in Release mode as it incorrectly defines the _ATL_MIN_CRT macro. The sample on the disc does not have this problem. (Disc 1 if you purchased Visual C++; Disc 3 if you purchased Visual Studio.) Workaround
the Preprocessor definitions edit box. 3.Choose the Link tab. In the Output Category, remove DllMain from the Entry-point symbol edit box. Link Error in Debug Build of COM Sample acdual/mfcctrlThis sample will fail under debug builds looking for comsuppd.lib. To fix the problem, go into the Project Settings dialog box and remove _COM_DEBUG from the Preprocessor definitions box in the C/C++ Preprocessor section.
Typo in tan and tanh SampleIn the documentation of tan and tanh, there is a typo in the sample. The current sample shows:
printf( "tan( %f ) = %f\n", x, y ); printf( "tanh( %f ) = %f\n", y, x );It should be:
printf( "tan( %f ) = %f\n", pi/4, x ); printf( "tanh( %f ) = %f\n", x, y );The correct output is:
tan( 0.785398 ) = 1.000000 tanh( 1.000000 ) = 0.761594See both the \DEVSTUDIO\VC\SAMPLES and the \OLEDB\SAMPLES directories on the first Visual C++ CD.
BINDENRL Sample Fails to Copy STDREG32.MDBTo build the BINDENRL sample, you'll need to manually copy the database file stdreg32.mdb into the same local directory that you copy the samples source files. You will find stdreg32.mdb in the DEVSTUDIO\VC\Samples\mcl\mfc\database\daoenrol directory. This directory is on the disc that includes "Microsoft Visual C++" on the label. (Disc 1 if you purchased Visual C++; Disc 3 if you purchased Visual Studio.)
Access Violation in Visual Basic 5.0 When Running COMEXCEL SampleIf you get an access violation while running the COMEXCEL sample in Visual Basic 5.0 under Windows NT V4.0, please install the Windows NT Service Pack 2.
Running OLE SDK SamplesBefore you run an OLE SDK sample, you should first copy the following subdirectories from the first VC++ product CD
DevStudio\VC\Samples\SDK\ole\include DevStudio\VC\Samples\SDK\ole\libto the following subdirectories on the disk (in this case c:) that will hold the OLE samples
c:\samples\ole\include c:\samples\ole\libYou can now install the sample files in any directory on the disk (in this case c:) and compilation will find the include and lib directories. If you have an MSTOOLS environment variable defined, you should put the include and lib directories in the following location on your hard disk: MSTOOLS path\samples.
Running InOLE2 SDK SamplesBefore you run an InOLE2 SDK sample, you should first copy the following subdirectories from the first VC++ product CD
DevStudio\VC\Samples\SDK\ole\inole2\inc DevStudio\VC\Samples\SDK\ole\inole2\libto the following subdirectories on the disk (in this case c:) that will hold the OLE samples
c:\samples\ole\inole2\inc c:\samples\ole\inole2\libYou can now install the sample files in any directory on the disk (in this case c:) and compilation will find the inc and lib directories. If you have an MSTOOLS environment variable defined, you should put the inc and lib directories in the following location on your hard disk: MSTOOLS path\samples.
|
Keywords : kbtlc
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |