import msado15.dll problem 
Author Message
 import msado15.dll problem

When I try to use ADO in my vc++ program, I added the following line at the
top of my .cpp.

#import "C:\Program Files\Common Files\System\ADO\msado15.dll" no_namespace

But I got this compiling error message:

c:\programming\test\debug\msado15.tlh(403) : warning C4146: unary minus
operator applied to unsigned type, result still unsigned
c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) :
fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must not
#include <windows.h>

Can anybody give me some idea? Did I miss something?

Jerry



Sat, 18 Sep 2004 09:52:02 GMT  
 import msado15.dll problem
You should add it to the stdafx.h.
Good luck.



Quote:
> When I try to use ADO in my vc++ program, I added the following line at
the
> top of my .cpp.

> #import "C:\Program Files\Common Files\System\ADO\msado15.dll"
no_namespace

> But I got this compiling error message:

> c:\programming\test\debug\msado15.tlh(403) : warning C4146: unary minus
> operator applied to unsigned type, result still unsigned
> c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) :
> fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must
not
> #include <windows.h>

> Can anybody give me some idea? Did I miss something?

> Jerry



Sat, 18 Sep 2004 13:37:43 GMT  
 import msado15.dll problem
Try this, check the KB article in the comments for more
information.

#pragma warning(push)                   // Needs to be
done in order to suppress warning message
#pragma warning(disable:4146)   // caused by bug in ADO
(MS Knowledge Base article Q253317)
#import "C:\Program Files\Common
Files\system\ado\msado15.dll" rename_namespace("ADOCG")
rename("EOF", "EndOfFile")
using namespace ADOCG;
#pragma warning(pop)

Quote:
>-----Original Message-----
>When I try to use ADO in my vc++ program, I added the

following line at the
Quote:
>top of my .cpp.

>#import "C:\Program Files\Common

Files\System\ADO\msado15.dll" no_namespace
Quote:

>But I got this compiling error message:

>c:\programming\test\debug\msado15.tlh(403) : warning
C4146: unary minus
>operator applied to unsigned type, result still unsigned
>c:\program files\microsoft visual studio\vc98

\mfc\include\afxv_w32.h(14) :
Quote:
>fatal error C1189: #error :  WINDOWS.H already included.  
MFC apps must not
>#include <windows.h>

>Can anybody give me some idea? Did I miss something?

>Jerry

>.



Sat, 18 Sep 2004 21:45:39 GMT  
 import msado15.dll problem
Thanks Ryan, that solves the warning message. But I still got the fatal
error message:

c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) :
fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must not
#include <windows.h>

I use Direct Play network in my program. Is it the reason?

Jerry


Quote:
> Try this, check the KB article in the comments for more
> information.

> #pragma warning(push) // Needs to be
> done in order to suppress warning message
> #pragma warning(disable:4146) // caused by bug in ADO
> (MS Knowledge Base article Q253317)
> #import "C:\Program Files\Common
> Files\system\ado\msado15.dll" rename_namespace("ADOCG")
> rename("EOF", "EndOfFile")
> using namespace ADOCG;
> #pragma warning(pop)

> >-----Original Message-----
> >When I try to use ADO in my vc++ program, I added the
> following line at the
> >top of my .cpp.

> >#import "C:\Program Files\Common
> Files\System\ADO\msado15.dll" no_namespace

> >But I got this compiling error message:

> >c:\programming\test\debug\msado15.tlh(403) : warning
> C4146: unary minus
> >operator applied to unsigned type, result still unsigned
> >c:\program files\microsoft visual studio\vc98
> \mfc\include\afxv_w32.h(14) :
> >fatal error C1189: #error :  WINDOWS.H already included.
> MFC apps must not
> >#include <windows.h>

> >Can anybody give me some idea? Did I miss something?

> >Jerry

> >.



Sun, 19 Sep 2004 03:42:26 GMT  
 import msado15.dll problem
I'm not real familiar with Direct Play, so I can't say.
Are you including windows.h in one of your headers? If so,
try commenting that out. MFC includes windows.h in one of
it's headers (where you see the error coming from), so you
do not need to include it.

Quote:
>-----Original Message-----
>Thanks Ryan, that solves the warning message. But I still
got the fatal
>error message:

>c:\program files\microsoft visual studio\vc98

\mfc\include\afxv_w32.h(14) :
Quote:
>fatal error C1189: #error :  WINDOWS.H already included.  
MFC apps must not
>#include <windows.h>

>I use Direct Play network in my program. Is it the reason?

>Jerry



>> Try this, check the KB article in the comments for more
>> information.

>> #pragma warning(push) // Needs to be
>> done in order to suppress warning message
>> #pragma warning(disable:4146) // caused by bug in ADO
>> (MS Knowledge Base article Q253317)
>> #import "C:\Program Files\Common
>> Files\system\ado\msado15.dll" rename_namespace("ADOCG")
>> rename("EOF", "EndOfFile")
>> using namespace ADOCG;
>> #pragma warning(pop)

>> >-----Original Message-----
>> >When I try to use ADO in my vc++ program, I added the
>> following line at the
>> >top of my .cpp.

>> >#import "C:\Program Files\Common
>> Files\System\ADO\msado15.dll" no_namespace

>> >But I got this compiling error message:

>> >c:\programming\test\debug\msado15.tlh(403) : warning
>> C4146: unary minus
>> >operator applied to unsigned type, result still
unsigned
>> >c:\program files\microsoft visual studio\vc98
>> \mfc\include\afxv_w32.h(14) :
>> >fatal error C1189: #error :  WINDOWS.H already
included.
>> MFC apps must not
>> >#include <windows.h>

>> >Can anybody give me some idea? Did I miss something?

>> >Jerry

>> >.

>.



Sun, 19 Sep 2004 06:49:30 GMT  
 import msado15.dll problem
Hi Jerry,

We need to place #include "stdafx.h" before any other code. In the source
file, it should look like:
#include "stdafx.h"

#import "C:\Program Files\Common Files\System\ADO\msado15.dll"\
    no_namespace rename("EOF","EndOfFile")

. other code

Hope it helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Regards,

Bill Cheng
Microsoft Support Engineer

--------------------

| Subject: import msado15.dll problem
| Date: Mon, 1 Apr 2002 17:52:02 -0800
| Lines: 20
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

| Newsgroups: microsoft.public.vc.database
| NNTP-Posting-Host: 216-55-165-230.dsl.san-diego.abac.net 216.55.165.230
| Path: cpmsftngxa07!cpmsftngxa09!tkmsftngp01!tkmsftngp04
| Xref: cpmsftngxa07 microsoft.public.vc.database:26390
| X-Tomcat-NG: microsoft.public.vc.database
|
| When I try to use ADO in my vc++ program, I added the following line at
the
| top of my .cpp.
|
| #import "C:\Program Files\Common Files\System\ADO\msado15.dll"
no_namespace
|
|
| But I got this compiling error message:
|
| c:\programming\test\debug\msado15.tlh(403) : warning C4146: unary minus
| operator applied to unsigned type, result still unsigned
| c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) :
| fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must
not
| #include <windows.h>
|
|
| Can anybody give me some idea? Did I miss something?
|
| Jerry
|
|
|



Sun, 19 Sep 2004 10:45:16 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Problems importing msado15.dll

2. Problem importing msado15.dll

3. Problem with #import msado15.dll :enum type redefinition

4. Problems importing msado15.dll

5. IN Atl7.0 where to import msado15.dll

6. Importing MSADO15.dll

7. Importing msado15.dll

8. Unable to import msado15.dll

9. #import msado15.dll

10. ADO : #import <msado15.dll> statement

11. Pbm Importing msADO15.DLL

12. #import "msado15.dll"

 

 
Powered by phpBB® Forum Software