@keymark It seems that the configuration ui can be called out with code? Maybe someone else wrote it wrong?
---- ME: I dont understood this translating? What would be "configuration UI can be called out with code?" some (simple code) example to my understanding???
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
function PromptDataSource(ParentHandle: THandle; InitialString: WideString): WideString; var DataInit: IDataInitialize; DBPrompt: IDBPromptInitialize; DataSource: IUnknown; InitStr: PWideChar; begin Result := InitialString; DataInit := CreateComObject(CLSID_DataLinks) as IDataInitialize; if InitialString <> '' then DataInit.GetDataSource(nil, CLSCTX_INPROC_SERVER, PWideChar(InitialString), IUnknown, DataSource); DBPrompt := CreateComObject(CLSID_DataLinks) as IDBPromptInitialize; if Succeeded(DBPrompt.PromptDataSource(nil, ParentHandle, DBPROMPTOPTIONS_PROPERTYSHEET, 0, nil, nil, IUnknown, DataSource)) then begin InitStr := nil; DataInit.GetInitializationString(DataSource, True, InitStr); Result := InitStr; end; end; begin PromptDataSource(Handle, memo1.Text) end;
procedure TForm1.Button1Click(Sender: TObject); var MyRegistry : TRegistry; WhatIShouldUse: integer; begin {$IFDEF WIN32} WhatIShouldUse := KEY_WOW64_32KEY; {$ELSE} // if not have others platforms... WhatIShouldUse := KEY_WOW64_64KEY; {$ENDIF} // MyRegistry := TRegistry.Create(KEY_ALL_ACCESS or WhatIShouldUse); // Help: System.Win.Registry.TRegistry.Access ... <-- other mode try // MyRegistry.RootKey := HKEY_CURRENT_USER; // Label1.Caption := MyRegistry.RootKeyName; // if MyRegistry.OpenKey('Software' { \WOW6432Node' } , false) then // HKEY_LOCAL_MACHINE begin // if MyRegistry.KeyExists('WOW6432Node') then begin if MyRegistry.OpenKey('WOW6432Node', false) then MyRegistry.GetKeyNames(ListBox1.Items) else ShowMessage('It was not possible open it - 2'); end; // ShowMessage('This is the key content...') end else ShowMessage('It was not possible open it - 1 '); finally if not(MyRegistry = nil) then begin MyRegistry.CloseKey; MyRegistry.Free; end; end; end;
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
on registry you go found the keys to DLLs, be 32 or 64bits installed, BECAUSE IT'S NOT POSSIBLE INSTALL TWO VERSION IN SAME MSWINDOWS. -- or you install 32bits, or install 64bits -- not two taste!!!
in my sample, above, I did:
1) I installed ACE 32bits by Microsoft download 2) in RAD 11, I did a 32bits project with code above 3) build and run... the screenshot above show the resulted
later...
1) uninstalled 32bits, and installed 64bits of ACE 2) using same project I just added new platform 64bits 3) build and run and you can see the screenshot above.
summary: same in MSWindows 10 64bits, you can just install "1" of "2" taste of ACE, or be: install 32bits or install 64bits.
in Delphi, you can have same project and compiling in 32bits or 64bits and all works.
Then, you can see that "in MSWindows" you'll have just one DLL taste, not two.
you see me?
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
function GetProviderVer():String; const ACE='Microsoft.ACE.OLEDB.'; var Names: TStrings; iIndex:Integer; begin Result:=''; Names:=TStringList.Create; try GetProviderNames(Names); for iIndex := 0 to Names.Count-1 do begin if Pos(ACE,Names[iIndex])>0 then begin //Microsoft.ACE.OLEDB.12.0 Result:=Names[iIndex]; //Result:=Result.Substring(ACE.Length,Result.Length-ACE.Length); Break; end; end; finally Names.Free; end; end;