Click here to Skip to main content
15,926,596 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: hiding mapped drive Pin
Dave Kreskowiak19-Mar-08 11:11
mveDave Kreskowiak19-Mar-08 11:11 
GeneralRe: hiding mapped drive Pin
Cory Kimble24-Mar-08 4:37
Cory Kimble24-Mar-08 4:37 
GeneralRe: hiding mapped drive Pin
Dave Kreskowiak24-Mar-08 10:34
mveDave Kreskowiak24-Mar-08 10:34 
GeneralTwo simple questions I think Pin
cstrader23219-Mar-08 9:02
cstrader23219-Mar-08 9:02 
GeneralRe: Two simple questions I think Pin
Smithers-Jones19-Mar-08 9:17
Smithers-Jones19-Mar-08 9:17 
GeneralRe: Two simple questions I think Pin
cstrader23219-Mar-08 9:51
cstrader23219-Mar-08 9:51 
QuestionI hate reportviewer......isn't there something better!?!? Pin
Tom Wright19-Mar-08 8:45
Tom Wright19-Mar-08 8:45 
AnswerRe: I hate reportviewer......isn't there something better!?!? Pin
Dave Kreskowiak19-Mar-08 10:34
mveDave Kreskowiak19-Mar-08 10:34 
GeneralRe: I hate reportviewer......isn't there something better!?!? Pin
Tom Wright20-Mar-08 4:54
Tom Wright20-Mar-08 4:54 
GeneralRe: I hate reportviewer......isn't there something better!?!? Pin
Dave Kreskowiak20-Mar-08 4:59
mveDave Kreskowiak20-Mar-08 4:59 
AnswerRe: I hate reportviewer......isn't there something better!?!? Pin
darkelv22-Mar-08 18:38
darkelv22-Mar-08 18:38 
QuestionObject synchronization method was called from an unsynchronized block of code. Pin
RJGCarey19-Mar-08 8:07
RJGCarey19-Mar-08 8:07 
GeneralRe: Object synchronization method was called from an unsynchronized block of code. Pin
RJGCarey19-Mar-08 9:01
RJGCarey19-Mar-08 9:01 
GeneralUsing "wdPropertyTimeLastSaved" fon Userforms for Word. Pin
Harold_Wishes19-Mar-08 7:07
Harold_Wishes19-Mar-08 7:07 
GeneralGet Hard disc Serial number Pin
Rupesh Kumar Swami19-Mar-08 6:31
Rupesh Kumar Swami19-Mar-08 6:31 
AnswerRe: Get Hard disc Serial number Pin
Rajesh Anuhya19-Mar-08 19:13
professionalRajesh Anuhya19-Mar-08 19:13 
GeneralRe: Get Hard disc Serial number Pin
Rupesh Kumar Swami20-Mar-08 3:42
Rupesh Kumar Swami20-Mar-08 3:42 
Questionselect statement that will retrieve all entries that have a certian letter combination in it? Pin
Mr Oizo19-Mar-08 4:40
Mr Oizo19-Mar-08 4:40 
AnswerRe: select statement that will retrieve all entries that have a certian letter combination in it? Pin
Dave Kreskowiak19-Mar-08 5:51
mveDave Kreskowiak19-Mar-08 5:51 
GeneralRe: select statement that will retrieve all entries that have a certian letter combination in it? Pin
Mr Oizo19-Mar-08 20:59
Mr Oizo19-Mar-08 20:59 
GeneralUnsigned Integers and Marshal.ReadInt32() Pin
VFaul19-Mar-08 4:16
VFaul19-Mar-08 4:16 
GeneralRe: Unsigned Integers and Marshal.ReadInt32() Pin
Dave Kreskowiak19-Mar-08 4:39
mveDave Kreskowiak19-Mar-08 4:39 
GeneralRe: Unsigned Integers and Marshal.ReadInt32() Pin
VFaul19-Mar-08 7:25
VFaul19-Mar-08 7:25 
GeneralRe: Unsigned Integers and Marshal.ReadInt32() Pin
Dave Kreskowiak19-Mar-08 8:15
mveDave Kreskowiak19-Mar-08 8:15 
VFaul wrote:
What baffles me is that there aren't unsigned marshaling methods: Marshal.ReadUInt16(), ReadUIn32(), and ReadUInt64()!? I'm being forced to do four ReadByte() calls when one call to ReadUInt32() is all I would need.


Yep. After looking at the code for the Marshal class, ReadInt32 method, it's sort of obvious why. That method has but a single line of code that calls a function, ND_RI4, exported by mscoree.dll. This function reads a 4 byte value and returns an I4, or Int32. The only other exported functions that do this are:
    ND_RI2  -  Returns a 16-bit signed integer
    ND_RI4  -  Returns a 32-bit signed integer
    ND_RI8  -  Returns a 64-bit signed integer
and
    ND_RU1  -  Returns a single byte

There are counterpart functions that write values too, modeled after these "read" version. Sadly, it boils down to the CLR doesn't natively support what you want to do.

I also looked into the possibility of using Marshal.ReadIntPtr, which returns a processor width pointer. On any non-x64 version of Windows, this always maps to a 32-bit unsigned integer. But, there is no conversion supplied to go from an IntPtr to a UInt, only a conversion to Int32 exists.



A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007




GeneralChanging VB Project Properties Pin
Jeeva Mary Varghese19-Mar-08 1:06
Jeeva Mary Varghese19-Mar-08 1:06 

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.