Difference between revisions of "Microsoft KB Archive/253317"

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - """ to """)
 
(2 intermediate revisions by the same user not shown)
Line 64: Line 64:
 
<pre class="codesample">#pragma warning(push)
 
<pre class="codesample">#pragma warning(push)
 
#pragma warning(disable:4146)
 
#pragma warning(disable:4146)
#import &quot;c:\program files\common files\system\ado\MSADO15.DLL&quot;
+
#import "c:\program files\common files\system\ado\MSADO15.DLL"
 
#pragma warning(pop)
 
#pragma warning(pop)
 
                 </pre>
 
                 </pre>
Line 73: Line 73:
 
== STATUS ==
 
== STATUS ==
  
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section.
+
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
  
 
</div>
 
</div>
Line 83: Line 83:
  
 
Save the following code as a .cpp file, and then compile and run the program with Visual C++. Accept the default workspace when prompted.
 
Save the following code as a .cpp file, and then compile and run the program with Visual C++. Accept the default workspace when prompted.
<pre class="codesample">#import &quot;C:\Program Files\Common Files\SYSTEM\ADO\MSADO15.DLL&quot; rename_namespace(&quot;ado20&quot;)
+
<pre class="codesample">#import "C:\Program Files\Common Files\SYSTEM\ADO\MSADO15.DLL" rename_namespace("ado20")
 
using namespace ado20;
 
using namespace ado20;
#include &lt;iostream&gt;
+
#include <iostream>
 
using namespace std;
 
using namespace std;
 
void main ()
 
void main ()
 
{
 
{
     cout &lt;&lt;&quot; You should see the warning in compiler's debug window&quot;&lt;&lt;endl;
+
     cout <<" You should see the warning in compiler's debug window"<<endl;
 
}
 
}
 
                 </pre>
 
                 </pre>

Latest revision as of 13:52, 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