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

  • Thread starter Thread starter Wolfgang Schwarz
  • Start date Start date
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
 
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.
 
Back
Top