tlb COM Object CoInitialize
http://www.drbob42.com/headconv/
https://www.freepascal.org/tools/h2pas.var
http://rvelthuis.de/articles/articles-convert.html#main
http://rvelthuis.de/articles/articles-cobjs.html
http://rvelthuis.de/programs/convertpack.html
https://github.com/neslib/Chet
https://www.drbob42.com/Delphi/headconv.htm
https://docwiki.embarcadero.com/RADStudio/Sydney/en/Type_Libraries
https://github.com/RRUZ/delphi-dev-shell-tools
https://docwiki.embarcadero.com/RADStudio/Sydney/en/Code_Generated_When_You_Import_Type_Library_Information
CreateComObject CreateOleObject ComObj.pas.
if SaveInitProc <> nil then TProcedure(SaveInitProc);
if (CoInitFlags <> -1) and Assigned(ComObj.CoInitializeEx) then
NeedToUninitialize := Succeeded(ComObj.CoInitializeEx(nil, CoInitFlags));
IsMultiThread := IsMultiThread or
((CoInitFlags and COINIT_APARTMENTTHREADED) <> 0) or
(CoInitFlags = COINIT_MULTITHREADED); //this flag has value zero
NeedToUninitialize := Succeeded(CoInitialize(nil));
Obviously he is used to call CoInitialize to initialize the com environment.
In the initialization section of ComObj.pas:
initialization
LoadComExProcs;
VarDispProc := @VarDispInvoke;
DispCallByIDProc := @DispCallByID;
SafeCallErrorProc := @SafeCallError;
if not IsLibrary then
SaveInitProc := InitProc;
//point the InitProc pointer to the function InitProb
InitProc := @InitComObj;
end;
Come to the Forms.pas file, take a look at the TApplication.Initialize section:
procedure TApplication.Initialize;
if InitProc <> nil then TProcedure(InitProc);
https://flylib.com/books/en/3.264.1.146/1/
Creating and Using COM Interfaces | C++Builder 5 ...
IDataBroker | Design time interface for remote data modules. |
IDispatch | Interface used for providing Automation. (This is used in some of the following examples.) |
IEnumVARIANT | Interface used for enumerating a collection of variant objects. |
IFont | Interface to a COM font object, which is actually a wrapper around a Windows font object. |
IPicture | Interface to a picture object, which is a language-neutral abstraction for bitmaps, icons, and metafiles, and its properties. |
IProvider | Provider interface for TClientDataSet . |
IStrings | Collection Interface for TStrings . |
IUnknown | The base interface for all other interfaces. Introduces the QueryInterface() method, which is useful for discovering and using other interfaces implemented by the same object. |
https://docs.microsoft.com/en-us/windows/win32/learnwin32/initializing-the-com-library
http://www.techvanguards.com/stepbystep/comdelphi/insideclient.asp
https://theroadtodelphi.com/category/com/
https://flylib.com/books/en/2.37.1/from_com_to_com_.html
沒有留言:
張貼留言