Microsoft KB Archive/253317: Difference between revisions

From BetaArchive Wiki
m (Text replacement - "<" to "<")
m (Text replacement - ">" to ">")
Line 85: Line 85:
<pre class="codesample">#import &quot;C:\Program Files\Common Files\SYSTEM\ADO\MSADO15.DLL&quot; rename_namespace(&quot;ado20&quot;)
<pre class="codesample">#import &quot;C:\Program Files\Common Files\SYSTEM\ADO\MSADO15.DLL&quot; rename_namespace(&quot;ado20&quot;)
using namespace ado20;
using namespace ado20;
#include <iostream&gt;
#include <iostream>
using namespace std;
using namespace std;
void main ()
void main ()

Revision as of 08:44, 21 July 2020

Knowledge Base


Article ID: 253317

Article Last Modified on 4/21/2005



APPLIES TO

  • Microsoft Visual C++ 6.0 Enterprise Edition
  • Microsoft Visual C++ 6.0 Professional Edition
  • Microsoft Visual C++ 6.0 Standard Edition
  • Microsoft ActiveX Data Objects 2.5
  • Microsoft ActiveX Data Objects 2.6
  • Microsoft ActiveX Data Objects 2.7



This article was previously published under Q253317

SYMPTOMS

When you compile an ActiveX Data Objects (ADO) application in Visual C++ 6.0 by using the #import directive with version 2.5 or 2.6 of Msado15.dll, you may receive the following warning:

warning C4146: unary minus operator applied to unsigned type, result still unsigned

RESOLUTION

Although this problem will most likely have no effect on your application, you can suppress the warning with the following code:

#pragma warning(push)
#pragma warning(disable:4146)
#import "c:\program files\common files\system\ado\MSADO15.DLL" 
#pragma warning(pop)
                

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

Steps to reproduce behavior

Save the following code as a .cpp file, and then compile and run the program with Visual C++. Accept the default workspace when prompted.

#import "C:\Program Files\Common Files\SYSTEM\ADO\MSADO15.DLL" rename_namespace("ado20")
using namespace ado20;
#include <iostream>
using namespace std;
void main ()
{
    cout <<" You should see the warning in compiler's debug window"<<endl;
}
                

Keywords: kbtshoot kbbug kbpending KB253317