address of value data
vb中一个字串变量的地址指针如何表示

解决方案 »

  1.   

    LONG RegSetValueEx(
      HKEY hKey,           // handle to key to set value for
      LPCTSTR lpValueName, // name of the value to set
      DWORD Reserved,      // reserved
      DWORD dwType,        // flag for value type
      CONST BYTE *lpData,  // address of value data
      DWORD cbData         // size of value data
    );
    中   CONST BYTE *lpData,  // address of value data
    vb中如何表示
      

  2.   

    Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long直接把字符串赋上去就行了,它会自动帮你取地址的,
    vb中字符串的地址用strptr去取
    s="abc"
    debug.print strptr(s)