Results 1 to 2 of 2

Thread: Registry! Help!

  1. #1

    Thread Starter
    eltiT resU motsuC Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Unhappy

    Ok...I am trying to make an app to add a few keys to the registry...(as well as change some of the strings...but I'll ask that later)
    I was looking at the registry code on VBWorld...

    Code:
    Public Sub CreateKey(hKey As Long, strPath As String)
    Dim hCurKey As Long
    Dim lRegResult As Long
    
    lRegResult = RegCreateKey(hKey, strPath, hCurKey)
    If lRegResult <> ERROR_SUCCESS Then
    'there is a problem
    End If
    
    lRegResult = RegCloseKey(hCurKey)
    
    End Sub
    ok...there it is...now I get a type mismatch

    how do I call this?
    I tried this....

    CreateKey "WARNING", "HKEY_LOCAL_MACHINE/SOFTWARE/APPNAME/"

    Nope...Type mismatch! How do I get this to work?



    Help! Thanks
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  2. #2

    Thread Starter
    eltiT resU motsuC Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    ok...hmmmm

    OK... I just realized that it has a 'LONG' required...

    CreateKey LONG,"Path"

    what do I use for the LONG variable?
    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