Importing msado15.dll 
Author Message
 Importing msado15.dll

All,

  I have an ATL project in which I #import "msado15.dll" and when I do my
build I recieve the following errors; (I give error and then src line it is
associated with)

g:\...\msado15.tlh(405) : warning C4146: unary minus operator applied to
unsigned type, result still unsigned
Src:    adCreateStructDoc = -2147483648,

g:\...\msado15.tlh(1306) : error C2629: unexpected 'short ('
g:\...\msado15.tlh(1306) : error C2238: unexpected token(s) preceding ';'
Src:    VARIANT_BOOL EOF;

This happens on both my dev machines 1) NT 4.0 SP6a  with VC++ 6 latest SP
2) W2K SP1 with VC++ 6 latest SP.
Tried moving the position of #import relative to #includes and get the same
errors...

Any ideas? Shouldn't there already be standard include files for ADO anyway?

Regards,
Erin.



Sat, 27 Sep 2003 06:38:06 GMT  
 Importing msado15.dll
For the second - you must rename EOF, because it conflicts with the
C RTL (the ADO designers haven't thought about convenience in C++...).
Use the rename keyword with #import.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================


Quote:
> All,

>   I have an ATL project in which I #import "msado15.dll" and when I do my
> build I recieve the following errors; (I give error and then src line it
is
> associated with)

> g:\...\msado15.tlh(405) : warning C4146: unary minus operator applied to
> unsigned type, result still unsigned
> Src:    adCreateStructDoc = -2147483648,

> g:\...\msado15.tlh(1306) : error C2629: unexpected 'short ('
> g:\...\msado15.tlh(1306) : error C2238: unexpected token(s) preceding ';'
> Src:    VARIANT_BOOL EOF;

> This happens on both my dev machines 1) NT 4.0 SP6a  with VC++ 6 latest SP
> 2) W2K SP1 with VC++ 6 latest SP.
> Tried moving the position of #import relative to #includes and get the
same
> errors...

> Any ideas? Shouldn't there already be standard include files for ADO
anyway?

> Regards,
> Erin.



Sat, 27 Sep 2003 09:27:55 GMT  
 Importing msado15.dll
As previously noted, you need to use the rename() qualifier on the #import
directive to prevent the second error.

As for the first, use #pragma warn(4146 :disable) directive before the
#import -- this turns off the warning.  You'll probably want to re-enable
the warning after the import.


Quote:
> All,

>   I have an ATL project in which I #import "msado15.dll" and when I do my
> build I recieve the following errors; (I give error and then src line it
is
> associated with)

> g:\...\msado15.tlh(405) : warning C4146: unary minus operator applied to
> unsigned type, result still unsigned
> Src:    adCreateStructDoc = -2147483648,

> g:\...\msado15.tlh(1306) : error C2629: unexpected 'short ('
> g:\...\msado15.tlh(1306) : error C2238: unexpected token(s) preceding ';'
> Src:    VARIANT_BOOL EOF;

> This happens on both my dev machines 1) NT 4.0 SP6a  with VC++ 6 latest SP
> 2) W2K SP1 with VC++ 6 latest SP.
> Tried moving the position of #import relative to #includes and get the
same
> errors...

> Any ideas? Shouldn't there already be standard include files for ADO
anyway?

> Regards,
> Erin.



Sat, 27 Sep 2003 21:11:06 GMT  
 
 [ 3 post ] 

 Relevant Pages 

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

2. Importing MSADO15.dll

3. Unable to import msado15.dll

4. import msado15.dll problem

5. Problems importing msado15.dll

6. #import msado15.dll

7. Problem importing msado15.dll

8. Pbm Importing msADO15.DLL

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

10. Use Alt In Vc Platform about #import msado15.dll

11. Problems importing msado15.dll

12. #import msado15.dll

 

 
Powered by phpBB® Forum Software