Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing OLEPublic attribute from all classes
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01510083
Message ID:
01510110
Views:
75
Ken,

Thanks a lot. I'm sure it will be very handy. For now I already fixed that project (there were only 4 classes with this property set), but as I suspected, it didn't solve the main problem.

The main problem is that we're getting C0005 errors as soon as we try to run our application. I'm wondering if you can give me some tips to troubleshoot this problem.

We did have the same problems before and we solved it by finding a few 'clean' computers where we were able to install it OK. Now the customer wants to have this app installed on his main PC also.

I'm wondering how can I get a list of all apps installed (like the one from Control Panel)?




>>Hi everybody,
>>
>>Do you know how can I remove Ole Public attribute from all VCX libraries included into the project?
>>
>>Thanks in advance.
>
>Hi Naomi. Just to test out my memory on the VCX and PJX file structures, I created a little program for you to use which allows you to pass any project file name as a parameter, then it opens all VCXs in that project and removes all OLEPublic settings from all the classes in each VCX. Just copy the program below into a project, like x.prg, then execute something like: DO x WITH "x1.pjx"
>
>
>LPARAMETERS tcPJXFile
>LOCAL lnLastSelect,lcHomeDir,lcName,lcFileName
>
>IF VARTYPE(tcPJXFile)#"C" OR NOT FILE(tcPJXFile)
>	? "Project '"+TRANSFORM(tcPJXFile)+"' not found."
>	RETURN .F.
>ENDIF
>lnLastSelect=SELECT()
>SELECT 0
>USE (tcPJXFile) AGAIN SHARED ALIAS _project
>LOCATE FOR ALLTRIM(Type)=="H" AND NOT DELETED()
>IF EOF()
>	USE
>	SELECT 0
>	RETURN .F.
>ENDIF
>lcHomeDir=LOWER(ALLTRIM(STRTRAN(HomeDir,CHR(0),"")))+"\"
>SCAN ALL FOR ALLTRIM(Type)=="V" AND NOT DELETED()
>	lcName=LOWER(ALLTRIM(Name))
>	IF EMPTY(lcName) OR NOT JUSTEXT(lcName)=="vcx"
>		LOOP
>	ENDIF
>	lcFileName=LOWER(FULLPATH(lcName,lcHomeDir))
>	IF NOT FILE(lcFileName)
>		? "File: '"+lcFileName+"' not found."
>		LOOP
>	ENDIF
>	SELECT 0
>	USE (lcFileName) AGAIN SHARED
>	REPLACE ALL Reserved2 WITH "" FOR Reserved2=="OLEPublic"
>	? "File: '"+lcFileName+"' updated."
>	SELECT _project
>ENDSCAN
>USE
>SELECT (lnLastSelect)
>? "Project: '"+tcPJXFile+"' updated."
>RETURN
>
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform