Re: Win AP question
From: Einar Høst (_ebuffer__at_hotmail.com)
Date: 04/16/04
- Next message: Morten Wennevik: "Re: How to make help files ?"
- Previous message: Morten Wennevik: "Re: helpstrings"
- In reply to: Tom Shelton: "Re: Win AP question"
- Next in thread: Tom Shelton: "Re: Win AP question"
- Reply: Tom Shelton: "Re: Win AP question"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 16 Apr 2004 10:17:45 +0200
I have a follow-up question:
What to do when the type of struct depends on some other input parameter?
Specifically, I need to call a Win32 API function called GetTapeParameters.
I written this:
[DllImport("kernel32"), SetLastError=true]
static extern int GetTapeParameters(
IntPtr hTape,
int dwOperation,
??? lpTapeInformation
)
The problem is that lpTapeInformation should point to different kinds of
structs depending on the value for dwOperation (dwOperation
GET_TAPE_MEDIA_INFORMATION implies a TAPE_GET_MEDIA_PARAMETERS struct,
whereas dwOperation GET_TAPE_DRIVE_INFORMATION implies a
TAPE_GET_DRIVE_PARAMETERS struct). Therefore, I can't simply put ref
<struct-type> lpTapeInformation...
Any help would be much appreciated!
- Einar
- Next message: Morten Wennevik: "Re: How to make help files ?"
- Previous message: Morten Wennevik: "Re: helpstrings"
- In reply to: Tom Shelton: "Re: Win AP question"
- Next in thread: Tom Shelton: "Re: Win AP question"
- Reply: Tom Shelton: "Re: Win AP question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|