Call now: (800) 766-1884  



 Home


 SQL Server Tips
 SQL Server Training

 SQL Server Consulting
 SQL Server Support
 SQL Server Remote DBA



 Articles
 Services
 SQL Server Scripts
 Scripts Menu



 

 

 

 
 

SQL Server

SQL Server Tips by Gama and Naughter Consulting

 


Testing the Code (Win32 DLL Support)

To test the DLL as a standard Win32 DLL, a simple Visual C++ console app is included in a “VC6” directory underneath the XP code directory. To link to the XP DLL, we simply include the “XP_SERVERREACHABLE.lib” file in the “Object / Library Modules” Link setting for this test project. The test app contains the following code:

#include "..\PingMachine.h"

int main(int /*argc*/, char* /*argv*/[])
{
TCHAR* pszServer = _T("192.168.1.5");

BOOL bReachable = IcmpServerReachable(pszServer);
_tprintf(_T("Reachable: %d\n"), bReachable);

return 0;
}

One point to note is that because all XP’s developed with the XP++ class framework link to the ODS “Opends60” DLL, the XP DLL will only load up correctly if it is located in the SQL Server “Binn” directory. Even if your client app (such as the client app we have here) does not do anything SQL Server related, it will only start correctly if it is also located in the “Binn” directory. Again, also try changing the value of “pszServer” and observe the different values, which get printed out.


The above book excerpt is from:

Super SQL Server Systems
Turbocharge Database Performance with C++ External Procedures

ISBN: 0-9761573-2-2
Joseph Gama, P. J. Naughter

 http://www.rampant-books.com/book_2005_2_sql_server_external_procedures.htm

 


 

 

 

Burleson Consulting Remote DB Administration


 

 


 

 

 

 

 
Burleson is the America's Team

Note: The pages on this site were created as a support and training reference for use by our staff of DBA consultants.  If you find it confusing, please exit this page.

Errata?  SQL Server technology is changing and we strive to update our SQL Server support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:and include the URL for the page.
 


Burleson Consulting
SQL Server database support

 

Copyright © 1996 -  2013 by Vaaltech Web Services. All rights reserved.

Hit Counter