Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to register an ocx used in RUNTIME PB application

324 views
Skip to first unread message

arvind

unread,
Aug 2, 2000, 3:00:00 AM8/2/00
to
I am using microsoft progress bar (OCX)in my application,however after
installing the runtime application ,the window using the progress bar has
the problem.Can anybody tell me how to crosscheck whether the particular OCX
is
registered or not on the machine.If not registered then how to register the
OCX on the Window'95 platform during running of the application.

Thanks in Advance


Arvind Singh
mapi...@hotmail.com

Андрей Нагорный

unread,
Aug 2, 2000, 3:00:00 AM8/2/00
to
Use API function : RegisterDLL() ....

arvind <mapi...@hotmail.com> пишет в
сообщении:ByazxlI$$GA...@forums.sybase.com...

Anand Kumar

unread,
Aug 2, 2000, 3:00:00 AM8/2/00
to
Hi,
You should be able to see in the object browser/OCX of Powerbuilder if the
object has been registered.
You can register an OCX using regsvr.exe "ocx name"

Thanks,
Anand Kumar
arvind <mapi...@hotmail.com> wrote in message
news:ByazxlI$$GA...@forums.sybase.com...

arvind

unread,
Aug 3, 2000, 3:00:00 AM8/3/00
to
Anand Kumar ,

What you say is correct but if my EXE is running at client place then
what I am looking at is how dynamically I can crosscheck the registeration
of OCX at the window which is using the OCX without the end user getting
and error and register only if required by using regsvr.exe

Regards

Anand Kumar <kumara...@hotmail.com> wrote in message
news:y95fI2I$$GA....@forums.sybase.com...

Jim Leary

unread,
Aug 3, 2000, 3:00:00 AM8/3/00
to
Try this:

Declare the following:

Function long DllRegisterServer() Library "myobject.OCX"

In your script:

long ll_rc

ll_rc = DllRegisterServer()

if ll_rc < 0 then

MessageBox("", "Could not register OLE class ( myobject )")

return -1

end if

Good luck!

arvind

unread,
Aug 4, 2000, 3:00:00 AM8/4/00
to
Thanks Jim Leary
It works fine thanks a lot for your help.

Arvind
mapi...@hotmail.com


Jim Leary <jle...@mindspring.com> wrote in message
news:uw2ZQvX$$GA....@forums.sybase.com...

Scott McChesney

unread,
Aug 11, 2000, 3:00:00 AM8/11/00
to
We do this in a few instances in our application, because we don't use an
installation program to create our EXE's. What we do in our application is
we look for the Class ID key in the Registry (PB has some pretty decent
Registry functions - well, much better than VB 5's native functions!) We
don't care what the value is, only that it's there. If it's there, then you
don't have to do anything - the CLSID is what Windows uses to link up the
OCX to its registration key. If it's not, then you have to register it.
However, you don't have to use "regsvr32" and all that shell stuff.

Every OCX (at least every OCX I've ever worked with) contains an
externally-callable function "DllRegisterServer". I think they have to have
it, though I don't know that for sure, because I think it's what Windows
uses to register the OCX. Just declare an external function to it:

FUNCTION long RegisterMPGB() library "<progress bar OCX filename>" alias for
"DllRegisterServer"

Of course, you can name it whatever you want. Anyway, call that function,
and the OCX will register itself, and you're on your way. Just make sure
you don't call it if the OCX is registered - you can get strange results.
On most systems, I've had no problems, but on others, it actually registers
the OCX a second time, and then you'll never get it to work without hacking
the registry by hand.

Hope this helps...

Scott McChesney
mcche...@uihc.uiowa.edu

arvind wrote in message ...

0 new messages