Click here to Skip to main content
15,895,557 members
Home / Discussions / C#
   

C#

 
GeneralEnabling/Disabling toolbars dynamically Pin
amil021427-Oct-04 18:10
amil021427-Oct-04 18:10 
GeneralRe: Enabling/Disabling toolbars dynamically Pin
sreejith ss nair27-Oct-04 18:31
sreejith ss nair27-Oct-04 18:31 
Questionthe offset is calculated by byte or by double bytes? Pin
momer27-Oct-04 16:58
momer27-Oct-04 16:58 
AnswerRe: the offset is calculated by byte or by double bytes? Pin
sreejith ss nair27-Oct-04 18:32
sreejith ss nair27-Oct-04 18:32 
GeneralRe: the offset is calculated by byte or by double bytes? Pin
momer27-Oct-04 20:48
momer27-Oct-04 20:48 
GeneralRe: the offset is calculated by byte or by double bytes? Pin
Heath Stewart27-Oct-04 20:58
protectorHeath Stewart27-Oct-04 20:58 
GeneralRe: the offset is calculated by byte or by double bytes? Pin
momer27-Oct-04 21:30
momer27-Oct-04 21:30 
GeneralRe: the offset is calculated by byte or by double bytes? Pin
Heath Stewart27-Oct-04 21:41
protectorHeath Stewart27-Oct-04 21:41 
You should start by reading about the classes you're plan on using, like the StructLayoutAttribute and FieldOffsetAttribute (which is typically only useful when you need to declare a struct where the native definition uses a union). You should also read Marshaling Data with Platform Invoke[^] to better understand how data is marshaled as well as type mappings (like that an unmanaged long is a managed int; both are 32-bits - this is a common mistake that shouldn't be made).

I would define the IOCTL_SCSI_PASS_THROUGH like so:
internal const int IOCTL_SCSI_PASS_THROUGH = 0x4d004;
It's a constant - not a struct.

If you want to find P/Invoke signatures for many commonly used Win32 APIs, I suggest you take a look at http://pinvoke.net[^]. It even has the signature for DeviceIoControl[^].

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: the offset is calculated by byte or by double bytes? Pin
momer27-Oct-04 21:51
momer27-Oct-04 21:51 
GeneralRe:Stewart Pin
momer27-Oct-04 21:51
momer27-Oct-04 21:51 
AnswerRe: the offset is calculated by byte or by double bytes? Pin
Heath Stewart27-Oct-04 21:56
protectorHeath Stewart27-Oct-04 21:56 
GeneralXML Elements with escape characters in their names Pin
Guillermo Jimenez27-Oct-04 16:53
Guillermo Jimenez27-Oct-04 16:53 
GeneralRe: XML Elements with escape characters in their names Pin
Nick Parker27-Oct-04 17:50
protectorNick Parker27-Oct-04 17:50 
GeneralRe: XML Elements with escape characters in their names Pin
Guillermo Jimenez27-Oct-04 18:11
Guillermo Jimenez27-Oct-04 18:11 
GeneralRe: XML Elements with escape characters in their names Pin
Heath Stewart27-Oct-04 20:57
protectorHeath Stewart27-Oct-04 20:57 
GeneralColor shading like the Windows Media Player v10 Pin
Tony D. Abel27-Oct-04 15:57
Tony D. Abel27-Oct-04 15:57 
GeneralRe: Color shading like the Windows Media Player v10 Pin
Nick Parker27-Oct-04 17:53
protectorNick Parker27-Oct-04 17:53 
GeneralDataSet designer Pin
Corneliu Tusnea27-Oct-04 13:51
Corneliu Tusnea27-Oct-04 13:51 
GeneralRe: DataSet designer Pin
sreejith ss nair27-Oct-04 18:35
sreejith ss nair27-Oct-04 18:35 
GeneralRe: DataSet designer Pin
Corneliu Tusnea27-Oct-04 19:48
Corneliu Tusnea27-Oct-04 19:48 
Questionwhat's your number? Pin
Sled Dog27-Oct-04 11:54
Sled Dog27-Oct-04 11:54 
QuestionProtection level ? Pin
wtdoor196527-Oct-04 10:13
wtdoor196527-Oct-04 10:13 
AnswerRe: Protection level ? Pin
Christian Graus27-Oct-04 10:16
protectorChristian Graus27-Oct-04 10:16 
AnswerRe: Protection level ? Pin
sreejith ss nair27-Oct-04 18:19
sreejith ss nair27-Oct-04 18:19 
GeneralRe: Protection level ? Pin
Heath Stewart27-Oct-04 21:02
protectorHeath Stewart27-Oct-04 21:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.