Home All Groups Group Topic Archive Search About
Author
4 Apr 2005 4:09 AM
notregister
Hi

i have declared the following GUID
Public myGUID3 As New Guid("00873FDF-61A8-11D1-AA5E-00C04FB1728B")

when i run the program, during debugging, when i check the myGUID3 value, it
return as empty? how come i cannot the value that i have declared?

Author
4 Apr 2005 6:50 AM
Cor Ligthert
NotRegister,

Strange, where did you declare this?

Cor
Author
4 Apr 2005 7:01 AM
notregister
Hi,
indide the main class. whenever i check the watch window at the bottom of
the VS, it always show empty

Public Class Form1
    Inherits System.Windows.Forms.Form

    Public myGUID1 As New Guid("7D9623D8-6CB8-11D1-8656-080009DD935C")

   Public Sub ChangeConnection()
        Dim DeviceInfoSet As Long
        Dim InterfaceDataPtr As Device_Interface_Data
        Dim InterfaceDetailDataPtr As Device_Interface_Detail
        Dim InterfaceDetailDataSize As Long
        Dim DeviceCancel As Boolean
        Dim DeviceFound As Boolean
        Dim RetVal As Long
        Dim GuidPtr As New Guid

            'GUID
            For z = 1 To 3
                If z = 1 Then
                    'HP800 GUID2k
                    GuidPtr = myGUID1
                          .
                          .
                          .

when i put my mouse arrow over GuidPtr or myGUID1, it will show
{system.Guid}, when i check the values of it in the locals window, it show
empty.

Show quoteHide quote
"Cor Ligthert" wrote:

> NotRegister,
>
> Strange, where did you declare this?
>
> Cor
>
>
>
Author
4 Apr 2005 7:55 AM
Cor Ligthert
Notregister

And when you set this after it?

Dim a As String = (GuidPtr.ToString)
I don't know why this behaviour is as it is.

Cor
Author
4 Apr 2005 8:09 AM
notregister
Hi

a will return the correct GUID as string, but i do not understand why when i
check the local windows for GuidPtr , it return empty. Is my guid format
correct?

Show quoteHide quote
"Cor Ligthert" wrote:

> Notregister
>
> And when you set this after it?
>
> Dim a As String = (GuidPtr.ToString)
> I don't know why this behaviour is as it is.
>
> Cor
>
>
>
Author
4 Apr 2005 12:21 PM
Nick Hall
The Debugger does not show the actual contents of the Guid instance (at
least not in Visual Studio 2003).  The reference to Empty that you are
seeing is the Shared Readonly Field that the Guid type defines to indicate a
blank Guid.  If you want to confirm that the correct Guid has been assigned,
try calling the ToString() method in the command window.

Hope this helps,

Nick Hall

Show quoteHide quote
"notregister" <notregis***@discussions.microsoft.com> wrote in message
news:30C851F0-E317-4A9F-9FCC-A7272E416A79@microsoft.com...
> Hi
>
> a will return the correct GUID as string, but i do not understand why when
> i
> check the local windows for GuidPtr , it return empty. Is my guid format
> correct?
>
> "Cor Ligthert" wrote:
>
>> Notregister
>>
>> And when you set this after it?
>>
>> Dim a As String = (GuidPtr.ToString)
>> I don't know why this behaviour is as it is.
>>
>> Cor
>>
>>
>>