Sending IOCTLs to the GPS Intermediate Driver, how can I do it with VB.NET

W

Wolfgang Schwarz

Hi,

how can I send IOCTLs to the GPS Intermediate Driver with VB.NET ?


Unter
http://msdn.microsoft.com/library/d...controllinggpsintermediatedriverexecution.asp
there is a sample
HANDLE hGPS = CreateFile(L"GPD0:", GENERIC_READ, FILE_SHARE_READ |
FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
if (hGPS != INVALID_HANDLE_VALUE) {
DeviceIoControl(hGPS,IOCTL_SERVICE_REFRESH,0,0,0,0,0,0);
CloseHandle(hGPS);
}But it is in C ! Please could someone translate it to VB, or has a link to
a sample ?
Also a declare to the Coredll is nessesary.


Thank you for response

regards
Wolfgang
 
G

Guest

You simply need to learn how to P/Invoke. It's only 3 calls and should be
quite simple.

There are plenty of samples, inclusing a couple good primers in MSDN.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top