Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How can I register the ActiveX control ImageViewer2.ocx with VFP code

Posted on 2009-12-21
3
Medium Priority
?
1,349 Views
Last Modified: 2012-08-14
To use the AxtiveX control of Image Viewer CP Pro, the ocx needs to be registered. How can I do this by running some code?
0
Comment
Question by:nvdbijl
3 Comments
 
LVL 43

Accepted Solution

by:
pcelba earned 1000 total points
ID: 26100779
You may try
RegSvr32 ImageViewer2.ocx
from DOS/cmd window

or
RUN RegSvr32 ImageViewer2.ocx
from FoxPro

or you may try following code:
DECLARE LONG DllRegisterServer IN ImageViewer2.ocx
IF DllRegisterServer() = 0
* OK
ELSE
* Not OK
ENDIF


More stuff about programmatic registration is here:
http://fox.wikis.com/wc.dll?Wiki~ComRegUnreg
0
 
LVL 14

Expert Comment

by:tusharkanvinde
ID: 26102272
It is better to register during installation rather than during running. Registering requires admin rights which will force your software to be run as admin.
0
 
LVL 30

Expert Comment

by:Olaf Doschke
ID: 26104946
second tushar. A second best solution is creating a setup that enforces the program to run directly after the installation (but typically the user is asked, if he wants to do so and can deny that), because then that first run is also done as admin.

If you don't have any setup and simply deploy your app and runtimes without any registration, then you should consider creating an installer.

Bye, Olaf.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
The number of companies understanding the potential of IoT on B2B market is growing with each day. And yet only a small share of IoT developers have managed to equalize incomes and stay competitive in the international market.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question