Home > Back-end >  MFC to read and write the word file
MFC to read and write the word file

Time:04-30

Why am I in the use of AfxOleInit () (ADO), always prompt AfxOleInit is not defined?


I want to use ADO in CApp: : InitInstance () used in AfxOleInit initialized () is always prompt in undefined identifiers

CodePudding user response:

 # include & lt; Afxdisp. H> 

: : AfxOleInit ()

AfxOleInit
BOOL AFXAPI AfxOleInit ();

#include

The Return Value

Nonzero if successful; 0 if initialization fails, possibly because incorrect versions of the OLE system DLLs are installed.

Few

Initializes the OLE DLLs.

CodePudding user response:

reference 1/f, zhao teacher reply:
 # include & lt; Afxdisp. H> 

: : AfxOleInit ()

AfxOleInit
BOOL AFXAPI AfxOleInit ();

#include

The Return Value

Nonzero if successful; 0 if initialization fails, possibly because incorrect versions of the OLE system DLLs are installed.

Few

Initializes the OLE DLLs.

Bosses, these where I just learning, hope not to laugh

CodePudding user response:

Your original AfxOleInit (); Beginning with two and a half Angle of the colon, become : AfxOleInit ();
And in the current. CPP document begins with
# include & lt; Afxdisp. H>

CodePudding user response:

The
quoted zhao teacher reply: 3/f
your original AfxOleInit (); Beginning with two and a half Angle of the colon, become : AfxOleInit ();
And in the current. CPP document begins with
# include & lt; Afxdisp. H>

The original is SetRegistryKey (_T (" Local AppWizard - Generated Applications "));

if (! AfxOleInit ())
{
AfxMessageBox (_T (" unable to initialize the COM dynamic link library!" ));
Return FALSE;
}

CodePudding user response:

if (! AfxOleInit ())
Instead of
if (! : AfxOleInit ())

CodePudding user response:

Or an error, the global scope not AfxOlelnit ""

CodePudding user response:

reference 5 floor 4 teacher zhao reply:
if (! AfxOleInit ())
Instead of
if (! : AfxOleInit ())

Or an error, the global scope not AfxOlelnit ""
  • Related