Results 1 to 2 of 2

Thread: dword to long?

  1. #1

    Thread Starter
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    dword to long?

    hi all,

    i have this function that puts a dword in the registry. the problem is, it requires a Long variable, which is only numbers. The dword I want to put in is something like: 0000d6
    i get the error type mismatch, what i do understand
    my question: how do i convert dword to long?

    thanx in advance

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: dword to long?

    I Think....

    VB Code:
    1. Private Sub Form_Load()
    2.     MsgBox cLong("0000d6")
    3. End Sub
    4.  
    5. Private Function cLong(Hx As String) As Long
    6.     cLong = CLng("&H" & Hx)
    7. End Function
    should work?
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width