Click here to Skip to main content
15,912,329 members
Home / Discussions / C#
   

C#

 
AnswerRe: Use of multiple panel Control in winform Pin
Dexter Arora24-Mar-12 9:17
Dexter Arora24-Mar-12 9:17 
GeneralRe: Use of multiple panel Control in winform Pin
eupendra25-Mar-12 22:13
eupendra25-Mar-12 22:13 
GeneralRe: Use of multiple panel Control in winform Pin
Dexter Arora26-Mar-12 7:46
Dexter Arora26-Mar-12 7:46 
QuestionCan read 64bit Reg_Sz, but not 64bit D_Word Pin
turbosupramk323-Mar-12 8:48
turbosupramk323-Mar-12 8:48 
QuestionRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
Eddy Vluggen23-Mar-12 11:07
professionalEddy Vluggen23-Mar-12 11:07 
AnswerRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
turbosupramk323-Mar-12 11:43
turbosupramk323-Mar-12 11:43 
AnswerRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
Eddy Vluggen23-Mar-12 11:52
professionalEddy Vluggen23-Mar-12 11:52 
GeneralRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
turbosupramk323-Mar-12 12:38
turbosupramk323-Mar-12 12:38 
Hi, thanks for the reply.

So (when I get back to the office on Monday) if I change the appropriate uInt's to Int32's in the code section below, I should be able to make this work?


  UIntPtr key = new UIntPtr(hiveConst);
            IntPtr remKey;
            int ret = RegConnectRegistry(serverName, key, out remKey);
            UIntPtr remKeyUIntPtr = unchecked((UIntPtr)(long)(ulong)remKey);
            string result = GetRegKey64(remKeyUIntPtr, keyPath, RegSAM.WOW64_64Key, stringValue);
            //MessageBox.Show(result);
            RegCloseKey(remKey);
            return (result);
        }
 
        static public string GetRegKey64(UIntPtr inHive, String inKeyName, RegSAM in32or64key, String inPropertyName)
        {
            int hkey = 0;
/*-------*/ //RegistryKey remoteKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, "*******");
            try
            {
                uint lResult = RegOpenKeyEx(inHive, inKeyName, 0, (int)RegSAM.QueryValue | (int)in32or64key, out hkey);
                if (0 != lResult) return null;
                RegistryValueKind lpType = 0;
                uint lpcbData = 1024;
               
                StringBuilder strBuffer = new StringBuilder(1024);
 
                RegQueryValueEx(hkey, inPropertyName, 0, ref lpType, strBuffer, ref lpcbData);
                string value = strBuffer.ToString();
                return value;
            }

GeneralRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
Eddy Vluggen23-Mar-12 13:45
professionalEddy Vluggen23-Mar-12 13:45 
GeneralRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
turbosupramk323-Mar-12 18:33
turbosupramk323-Mar-12 18:33 
QuestionRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
Eddy Vluggen24-Mar-12 2:20
professionalEddy Vluggen24-Mar-12 2:20 
AnswerRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
turbosupramk324-Mar-12 15:14
turbosupramk324-Mar-12 15:14 
AnswerRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
turbosupramk326-Mar-12 6:04
turbosupramk326-Mar-12 6:04 
GeneralRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
turbosupramk326-Mar-12 4:58
turbosupramk326-Mar-12 4:58 
AnswerRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
Eddy Vluggen26-Mar-12 7:27
professionalEddy Vluggen26-Mar-12 7:27 
GeneralRe: Can read 64bit Reg_Sz, but not 64bit D_Word Pin
turbosupramk326-Mar-12 8:23
turbosupramk326-Mar-12 8:23 
QuestionChange the color of the mouse cursor (cross cursor) Pin
Wolfgang Kurz23-Mar-12 8:16
professionalWolfgang Kurz23-Mar-12 8:16 
AnswerRe: Change the color of the mouse cursor (cross cursor) Pin
OriginalGriff23-Mar-12 9:14
mveOriginalGriff23-Mar-12 9:14 
AnswerRe: Change the color of the mouse cursor (cross cursor) Pin
Philippe Mori23-Mar-12 12:35
Philippe Mori23-Mar-12 12:35 
GeneralRe: Change the color of the mouse cursor (cross cursor) Pin
Wolfgang Kurz23-Mar-12 23:08
professionalWolfgang Kurz23-Mar-12 23:08 
QuestionDirectoryInfo throwing ArgumentException Pin
MichCl23-Mar-12 4:53
MichCl23-Mar-12 4:53 
AnswerRe: DirectoryInfo throwing ArgumentException Pin
Wes Aday23-Mar-12 5:00
professionalWes Aday23-Mar-12 5:00 
GeneralRe: DirectoryInfo throwing ArgumentException Pin
MichCl23-Mar-12 5:25
MichCl23-Mar-12 5:25 
GeneralRe: DirectoryInfo throwing ArgumentException Pin
Wes Aday23-Mar-12 5:44
professionalWes Aday23-Mar-12 5:44 
GeneralRe: DirectoryInfo throwing ArgumentException Pin
MichCl23-Mar-12 7:46
MichCl23-Mar-12 7:46 

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.