Print Page | Close Window

kernel32 type is not defined

Printed From: One Stop Testing
Category: Testing Tools @ OneStopTesting
Forum Name: SilkTest @ OneStopTesting
Forum Discription: SilkTest is an automation tool for testing the functionality of enterprise applications in most versions of Windows, Sun Solaris 9 & 10, and Red Hat Enterprise Linux WS 2.1 & 3.0.
URL: http://forum.onestoptesting.com/forum_posts.asp?TID=1011
Printed Date: 02Dec2024 at 12:45pm


Topic: kernel32 type is not defined
Posted By: Amlika
Subject: kernel32 type is not defined
Date Posted: 26Apr2007 at 10:12pm
Hi, I am learning to use dlls in my tests and I'm facing this problem (don't seem to find anything exactly about this on the forum):

I need to change file compression and file encryption. So, I figured I need these functions:
code:
 
[ ] use "mswtype.inc"
[ ] use "mswfun32.inc"
[ ] use "mswconst.inc"
[ ]
[-] dll "kernel32.dll"
[ ] BOOL DeviceIoControl (HANDLE hDevice, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize,
LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped)
[ ] HANDLE CreateFile(LPCTSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
[ ] BOOL CloseHandle(HANDLE hObject)


But when I compile this, I get error that types LPVOID, LPWORD, LPOVERLAPPED are not defined.

I am clearly not including something, I just don't know what and how. I don't think the includes above are useful, since the files contain no related type or function declarations, but I've tried anyway



Replies:
Posted By: Deepika
Date Posted: 27Apr2007 at 3:07am
Hello,

OPEN_EXISTING is 3

I found this through a web search for "const OPEN_EXISTING visualbasic". At the very least,

a cache will have some code declaring the value. Sometimes it comes up on MSDN as the first

link, often it is somewhere else. I don't know if Micro$oft banks on this.




Print Page | Close Window