Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Where is KernelIoControl??

440 views
Skip to first unread message

Piotr Wypych

unread,
Mar 26, 2001, 3:08:38 AM3/26/01
to
I need to use KernelIoControl to read this damned serial number. I tried all
tricks and fall into conclusion, that with eVC++ I cant use this fuction.
What do I need? Platform Builder??

--
Piotr Wypych
Programy geodezyjne
co...@coder.atomnet.pl
www.coder.atomnet.pl
www.mapternet.com.pl
--

Forsman@noreplies.microsoft.com G Forsman

unread,
Mar 26, 2001, 3:22:32 AM3/26/01
to
Define the label WINCEOEM at the project level. KernelIoControl is in the
headers, just ifdef'd out by default.

BTW, the implementation of a standard serial number on any CE devices to
date has been optional for the OEMs. You may not get anything useful back.


"Piotr Wypych" <co...@coder.atomnet.pl> wrote in message
news:99mtdl$1t4e$1...@news2.ipartners.pl...

Piotr Wypych

unread,
Mar 26, 2001, 11:12:10 AM3/26/01
to
> Define the label WINCEOEM at the project level. KernelIoControl is in the
> headers, just ifdef'd out by default.

No, it doesnt work. When I define it, I get message like "pkfucs.h
missing" - i dont have this file on disc!. When i mimic presence of this
file and apriopriate definitions, the linker canot find KernelIoControl.. -
its not in the library!

Davorin Gec

unread,
Mar 29, 2001, 5:57:24 AM3/29/01
to

When I defined the function KernelIoControl in the way I show you below the
function was working.
I can reboot the system but I steal can't access device serial number on the
Compaq AERO 1550.

Does exist on Compaq any other method to access the serial number?

#include <WinBase.h>
#include <winioctl.h>

extern "C" {

BOOL KernelIoControl(DWORD, LPVOID, DWORD, LPVOID, DWORD, LPDWORD );

#define IOCTL_HAL_GET_DEVICE_INFO CTL_CODE(FILE_DEVICE_HAL,1,
METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_HAL_SEND_UDP CTL_CODE(FILE_DEVICE_HAL, 2,
METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_HAL_GET_IP_ADDR CTL_CODE(FILE_DEVICE_HAL, 3,
METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_HAL_RADIO_CNTRL CTL_CODE(FILE_DEVICE_HAL, 4,
METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_HAL_DDK_CALL CTL_CODE(FILE_DEVICE_HAL, 5,
METHOD_BUFFERED, FILE_ANY_ACCESS)

#define IOCTL_EDBG_REGISTER_CLIENT CTL_CODE(FILE_DEVICE_HAL, 6,
METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_EDBG_DEREGISTER_CLIENT CTL_CODE(FILE_DEVICE_HAL, 7,
METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_EDBG_REGISTER_DFLT_CLIENT CTL_CODE(FILE_DEVICE_HAL, 8,
METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_EDBG_SEND CTL_CODE(FILE_DEVICE_HAL, 9,
METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_EDBG_RECV CTL_CODE(FILE_DEVICE_HAL, 10,
METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_EDBG_SET_DEBUG CTL_CODE(FILE_DEVICE_HAL,11,
METHOD_BUFFERED, FILE_ANY_ACCESS)

#define IOCTL_SET_KERNEL_COMM_DEV CTL_CODE(FILE_DEVICE_HAL, 12,
METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_HAL_GET_UUID CTL_CODE(FILE_DEVICE_HAL, 13,
METHOD_BUFFERED,FILE_ANY_ACCESS)

#define IOCTL_HAL_INIT_RTC CTL_CODE(FILE_DEVICE_HAL, 14,
METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_HAL_REBOOT CTL_CODE(FILE_DEVICE_HAL, 15,
METHOD_BUFFERED, FILE_ANY_ACCESS)

#define IOCTL_HAL_ENABLE_SCHEDULER_LOGGING CTL_CODE(FILE_DEVICE_HAL, 16,
METHOD_BUFFERED, FILE_ANY_ACCESS)

#define IOCTL_SET_KERNEL_DEV_PORT CTL_CODE(FILE_DEVICE_HAL, 17,
METHOD_BUFFERED, FILE_ANY_ACCESS)

#define IOCTL_HAL_GET_DEVICEID CTL_CODE(FILE_DEVICE_HAL, 21,
METHOD_BUFFERED, FILE_ANY_ACCESS)


typedef struct _DEVICE_ID {
DWORD dwSize;
DWORD dwPresetIDOffset;
DWORD dwPresetIDBytes;
DWORD dwPlatformIDOffset;
DWORD dwPlatformIDBytes;
} DEVICE_ID, *PDEVICE_ID;
}

Use it this way:
{
// This works!
// KernelIoControl(IOCTL_HAL_REBOOT, NULL, 0, NULL, 0, NULL);


DEVICE_ID DevInfo;
DWORD RetBytes;
DevInfo.dwSize = sizeof(DEVICE_ID );
BOOL bError;

bError = KernelIoControl ( IOCTL_HAL_GET_DEVICEID,
NULL, 0,
&DevInfo, sizeof(DEVICE_ID), &RetBytes);
}

Good luck!
Gec


"Piotr Wypych" <co...@coder.atomnet.pl> wrote in message
news:99mtdl$1t4e$1...@news2.ipartners.pl...

Andreas Lohrentz

unread,
Apr 24, 2001, 11:10:36 AM4/24/01
to
I got the same problem. does anyone have already a solution for getting the
device_id?
i tried to read it from a jornada 720.

with regards

andreas

"Davorin Gec" <davor...@yahoo.com> schrieb im Newsbeitrag
news:OkRJD8DuAHA.1704@tkmsftngp04...

0 new messages