FoxPro Programming
COM registration
Gravatar is a globally recognized avatar based on your email address. COM registration
  Kuzma Karbachinskiy
  All
  Oct 4, 2018 @ 01:50pm

Hi Rick,

Thank you for your message. IIS Application pool identity set to Local system. My coworkers help me with script to set Data drive mapping on start virtual machine. Data drive is mapped share of another computer. I ran /unregserver and built executable again. Then I tested server in VFP and it was good. I did login application in Com mode error linked to Data Drive was gone, but on attempt to display next screen I got VFP error that I didn't have in 'File' mode. It was like child class can't see function parent class even child is direct class derived from parent. I tried to update the code. In 'File' mode error still absent, but in 'Com' mode error was the same. You wrote about differences between COM and DCOM and I probably ran DCOM. How can I update DCOM? Should be run Configuration wizard STEP 4 or do CONSOLE DCOMCONFIG? I have administrator as account.

Thank you, Kuzma Karbachinskiy kkarbachinskiy@oneworldonestop.com

Gravatar is a globally recognized avatar based on your email address. re: COM registration
  Rick Strahl
  Kuzma Karbachinskiy
  Oct 4, 2018 @ 11:04pm

Drive mappings made with a specific account are not visible to all users - only the user that made the mapping.

You can't use a Data Drive mapped in the interactive session in a System session. You have to the mapping as part of your code or run a startup script for the account that maps the drive for SYSTEM.

You can check for the data drive during startup and if it doesn't exist map it programmatically.

Here's a blog post that discusses how you can do this:

The best solution is not to rely on drive mappings but use a UNC path instead. Make sure you don't hard code paths and use a configuration setting for the base path instead.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM registration
  Kuzma Karbachinskiy
  Rick Strahl
  Oct 5, 2018 @ 08:32am

Hi Rick,

I'll look into drive mapping blog. Application has built in 'Error tracking' subsystem. It displays error page and writes error data into 'onerror' VFP table. There are no errors with executable and 'File' mode 'MessagingMechanism'. There is error with 'COM' and 'Com' mode 'MessagingMechanism'.

 * --- Create the HTML Object and set some properties
		oResponseForm=CREATEOBJECT("wwDHTMLForm",oFormRendered,.oResponse)
		WITH oResponseForm
			STORE .F. TO .lShowAsFullHTML, ;
				.lAbsolutePosition
			.lShowFormCaption = .T.
			.cFormAction= FORM_ACTION +"AmOrdSta"
			This.noResubmit(oResponseForm)
*!*				SubModule::NoResubmit(oResponseForm)
		ENDWITH 

Error said: 'Property NORESUBMIT is not found' I tried to run instead call to parent class

SubModule::NoResubmit(oResponseForm)

The result was the same. 'SubModule' is direct parent class of this program-class. Function NORESUBMIT belongs to Submodule. In the past you wrote that 'wwDHTMLForm' class is deprecated and no longer supported by Web Connect. Is it the case?

Thank you, Kuzma Karbachinsliy kkarbachinskiy@oneworldonestop.com

Gravatar is a globally recognized avatar based on your email address. re: COM registration
  Rick Strahl
  Kuzma Karbachinskiy
  Oct 5, 2018 @ 01:40pm

wwDhtmlForm and all of the DHTML classes have long been deprecated and are no longer shipped or documented. This was done in version 5.0 over 10 years ago - so yeah, very true 😃

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM registration
  Kuzma Karbachinskiy
  Rick Strahl
  Oct 9, 2018 @ 12:28pm

Hi Rick,

I am sorry for previous message. I have direct evidence that my question was wrong. Regardless deprecation many years ago wwDHTMLForm class does work for me. I have problem with object references into 'COM'. It works perfectly in 'File' mode. I am reading web connect documentation and find differences between 'File'/'COM' modes. I moved all DO PATH statements to set paths to each application folder and sub folder and all SET PROCEDURE TO programName ADDITIVE statements into MyServer.OnLoad() to make environment compatible with 'File'/'COM' modes. Function MyServer.OnInit() also has statements as it done into * wcDemoServer :: OnInit. The different objects of different classes can be instantiated in the same program with no problem, but references to some of them, like function calls, have the problems. Program libraries that contain those objects with references problems are in SET PROCEDURE TO programName ADDITIVE statements. I tried different types of references. The application used to developed and worked in 'File' mode many years. What can I do to fix objects references problems into 'COM' mode?

Thank you, Kuzma Karbachinskiy kkarbachinskiy@oneworldonestop.com

Gravatar is a globally recognized avatar based on your email address. re: COM registration
  Rick Strahl
  Kuzma Karbachinskiy
  Oct 9, 2018 @ 03:59pm

Make sure all your dependent programs are compiled into the EXE. Check your project and makes sure the PRGs you are calling for classes are included in the EXE. COM will not hunt for PRGs on disk but a standalone EXE might.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM registration
  Kuzma Karbachinskiy
  Rick Strahl
  Oct 11, 2018 @ 01:55pm

Hi Rick,

All program-classes with reference problems included in the project. Currently there are no build errors. It is possible to paste functions from parent to child class and from helper to working class and COM will be OK. The application has a lot of reports. Attempt to print one shown different problem. Problem in wwPDF.prg nLine=419. It is call REPORT FORM statement. It runs OK in executable and gave error with COM. Error said: 'User-interface operation not allowed at this time' How to fix it?

Thank you, Kuzma Karbachinskiy kkarbachinskiy@oneworldonestop.com

Gravatar is a globally recognized avatar based on your email address. re: COM registration
  Rick Strahl
  Kuzma Karbachinskiy
  Oct 11, 2018 @ 04:17pm

Please do not post every single different question on this thread. Start a new thread with a proper topic.

I won't answer any more questions for you here unless you follow at least basic protocol. I'm tired of answering your random questions that you never follow up on except with a new question.

+++ Rick ---

© 1996-2024