regtlib.exe and Vista

T

TMC

Hey All,

Not sure which newsgroup was the best or most appropriate for this so I
apologize for posting to 3.

I need to register .tlb files on a Windows Vista machine but regtlib.exe is
not part of Vista. I'm sure that others have encountered this.

Can someone please advise?

Thanks,

TC
 
T

TMC

There is no register or register .tlb option. The options are:

Query
Add
Delete
Copy
Save
Restore
Load
Unload
Compare
Export
Import
Flags

How is reg.exe specifically releated to regtlib.exe?
 
M

mayayana

I don't know what regtlib is, but if you look at the
Setup1 code for the PDW VB installer, you'll see this
comment for typelibs:

' Call vb6stkit.dll's RegisterTLB export which calls
' LoadTypeLib and RegisterTypeLib.


vb6stkit.dll is a custom DLL for the PDW which you can
ship. It provides various functions like logging and CAB
extraction for Setup1. It also has a method RegisterTLB.
You can get the necessary details from the Setup1
project code in the folder VB98\Wizards\PDWizard\Setup1

I've never tried calling LoadTypeLib and RegisterTypeLib,
but they look like they're fairly simple. Maybe you can
just call those directly.
 
T

TMC

Hey All,

I just needed this:

Declare Function LoadTypeLibEx Lib "OLEAUT32" ( _
ByVal szFile As Long, _
ByVal regkind As Long, _
TypeLib As IUnknown) As Long

Public Const REGKIND_REGISTER As Long = 1

Then call it like this:

Dim oTL As IUnknown

LoadTypeLibEx StrPtr([MyTLBFilePathAndName.tlb]), REGKIND_REGISTER, oTL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top