Re: TypeLibs and API Interfaces for Windows (Real Studio network user group Mailinglist archive)
|Re: TypeLibs and API Interfaces for Windows - William Yu|
|TypeLibs and API Interfaces for Windows - Garth Hjelte|
|Re: USD based cross-rates - Aaron Andrew Hunt|
|Re: TypeLibs and API Interfaces for Windows|
|Date: 01.08.11 17:12 (Mon, 1 Aug 2011 11:12:00 -0500)|
|From: William Yu|
On Mon, Aug 1, 2011 at 10:07 AM, Garth Hjelte <<email address removed>> wrote:
> Can you use Type Libraries with RS yet? I show some posts saying no, but
> they are are back to 2006.
As long as the Type Library is registered in the Registry you should be able
to locate it via Project->Add->ActiveX Component under the References tab.
We haven't received any requests yet to be able to load Type Libraries form
disk, but you are certainly welcome to add one to Feedback.
> If you can't, what is the recourse? Are things like I mentioned above nto
If the Type Library is not registered (this would surprise me), you can go
through the OLEObject class to automate the component. This is analogous to
VB's CreateObject function, but instead you would say:
Dim obj As New OLEObject( "Shell.Application" )
obj.BrowseForFolder( Self.Handle, "Pick something", 0 )
|TypeLibs and API Interfaces for Windows|
|Date: 01.08.11 16:07 (Mon, 01 Aug 2011 10:07:42 -0500)|
|From: Garth Hjelte|
I am slowly phasing my VB version of my main app out and have been
moving things over to RS slowly but surely.
I use some sample code from some very smart VB people that allows me
to call the system context menu for a file and display, and to add to
it. A big part of it is a Type Library, whcih integrates just fine
into VB, since VB is just a big enormous COM facility.
"In order the display the context menu for any object in the
namespace, two essential things are needed: a reference to the
specified object's parent IShellFolder interface; and the object's
pidl (pointer to an item ID list), relative to the parent
IShellFolder. Once obtained, a reference to the parent folder's
IContextMenu interface must also be obtained, initialized with the
proper data, and finally TrackPopupMenu is called to display the context menu."
All you to is add the Type Library as a reference.
Can you use Type Libraries with RS yet? I show some posts saying no,
but they are are back to 2006.
All Type Libraries are is a complex way to put in lots of declares
automatically. They define external function definitions, what is
"in" and what is "out" (and what's both), and applies it to the program.
I'm not big on the .tlb file or Type Library so much as to get the
functionality of getting "a reference to the specified object's
parent IShellFolder interface", that can be done with Declares perhaps?
If you can't, what is the recourse? Are things like I mentioned above
What I was thinking is bypassing all this, and making a custom .ocx
(ActiveX object) file with my VB code, then calling it from RS. Does
that sound like a good idea? I've never called a OCX from RS, yet.
Unsubscribe or switch delivery mode:
Search the archives: