
// Begin----------------------------------------------------------------
public class TypeLib
{
public native String Inf(String s);
static
{
System.loadLibrary("TypeLibInf");
}
public static void main(String[] args)
{
TypeLib TL = new TypeLib();
try
{
String Interface = TL.Inf("C:\\Windows\\System32\\wshom.ocx");
System.out.println(Interface);
}
catch (Exception e)
{
System.out.println(e);
}
}
}
// End------------------------------------------------------------------
'-Begin-----------------------------------------------------------------
Set TypeLibInf = CreateObject("COM_TYPELIBINF")
If IsObject(TypeLibInf) Then
Interface = TypeLibInf.COM_TYPELIBINF("C:\Dummy\COMBeep.dll")
MsgBox Interface
Set TypeLibInf = Nothing
End If
'-End-------------------------------------------------------------------
"-Begin-----------------------------------------------------------------
Program zTypeLib.
"-Type-Pools----------------------------------------------------------
Type-Pools OLE2.
"-Variables-----------------------------------------------------------
Data TypeLibInf Type OLE2_OBJECT.
Data Interface Type String Value ''.
Data TabInterface Type Table Of String.
Data strTemp Type String Value ''.
"-Main----------------------------------------------------------------
Create Object TypeLibInf 'COM_TYPELIBINF'.
If sy-subrc = 0 And TypeLibInf-HANDLE <> 0 And
TypeLibInf-TYPE = 'OLE2'.
Call Method Of TypeLibInf 'COM_TYPELIBINF' = Interface
Exporting
#1 = 'C:\Windows\System32\wshom.ocx'. "32-bit
"#1 = 'C:\Windows\SysWOW64\wshom.ocx'. "64-bit
Split Interface At ';' Into Table TabInterface.
Loop At TabInterface Into strTemp.
Write: / strTemp.
EndLoop.
Free Object TypeLibInf.
EndIf.
"-End-------------------------------------------------------------------
#-Begin-----------------------------------------------------------------
#-Packages--------------------------------------------------------------
from ctypes import *
#-Main------------------------------------------------------------------
TypeLibDLL = "C:\\Projects\\TypeLibInf\\TypeLibInf.dll"
TypeLib = windll.LoadLibrary(TypeLibDLL)
TypeLib.DLL_TypeLibInf.argtypes = [c_char_p]
TypeLib.DLL_TypeLibInf.restype = c_char_p
Lib = create_string_buffer(b"C:\\Windows\\System32\\wshom.ocx") #32bit
#Lib = create_string_buffer(b"C:\\Windows\\SysWOW64\\wshom.ocx") #64bit
Interface = TypeLib.DLL_TypeLibInf(Lib)
Interface = str(Interface)
lstInterface = Interface.split(";")
for i in range(len(lstInterface)):
print(lstInterface[i])
del TypeLib
#-End-------------------------------------------------------------------
#-Begin-----------------------------------------------------------------
#-Sub Main------------------------------------------------------------
Function Main() {
$TypeLib = New-Object -ComObject "COM_TYPELIBINF";
If ($TypeLib -isnot [__ComObject]) {
Exit;
}
$Files = Get-ChildItem -Path "C:\Dummy\" -Include @("*.dll","*.ocx") -Recurse;
ForEach ($File In $Files) {
$Interface = $TypeLib.COM_TYPELIBINF($File.Fullname);
$Interface = $Interface.Replace(";", "`r`n");
$NewName = $File.Fullname + ".int";
$Interface | Out-File $NewName;
}
}
#-Main----------------------------------------------------------------
Main;
#-End-------------------------------------------------------------------
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |