Call a CENTURA FORM from VISUAL C++

forum.sourcecode (2000-2005) & forum.td.sourcecode (2005-2010)
Galileo

Call a CENTURA FORM from VISUAL C++

Post by Galileo » 27 Oct 2006, 14:57

 Posted by:  Galileo 

Hello, i need to show Centura forms from an app created in Visual C++.
I create a COM Server (EXE) in Centura 3.0 and exposed a method that display
a form.
Everything is OK, the method is correctly invoked but the form isn't
showed...

Anyone knows wy ¿?

Jim McNamara

Re: Call a CENTURA FORM from VISUAL C++

Post by Jim McNamara » 27 Oct 2006, 15:44

 Posted by:  Jim McNamara 

Visual forms in a Gupta build COM are not supported.

Jonas Mandahl Pedersen

Re: Call a CENTURA FORM from VISUAL C++

Post by Jonas Mandahl Pedersen » 01 Nov 2006, 10:26

 Posted by:  Jonas Pedersen 

Not supported, but possible.
In my app, it is working perfect. (use it for cofiguring COM settings)
Please read this article:
TeaTalk archive - 2003/20030202.pdf

Jonas

Galileo

Re: Call a CENTURA FORM from VISUAL C++

Post by Galileo » 02 Nov 2006, 16:39

 Posted by:  Galileo 

Thanks for your reply but I'm already read that article and there's a
problem....

As it's mentioned to enable forms and dialog in a out-of-proc server a call
to a function named SalEnableCOMForms is necessary (to change the SQLWindows
runtime mode) To do this we must invoke an external function called
GetEnvPtr imported from CDLLIxx.DLL. The problem is that this function not
exist on that DLL (i'm currently working with SQLWindow 3.0 PTF3) .

What i'm missing ¿?...

Thanks again

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2385
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: Call a CENTURA FORM from VISUAL C++

Post by Jeff Luther » 02 Nov 2006, 18:08

 Posted by:  Jeff Luther 

You have to do a little detective work to figure this out:
-- TeaTalk past issues for 2003 are here:
TeaTalk archive - ?year=2003

-- the zip of files for issue 2003-02 is down the page.

-- include lib. in that zip, comfrm30.apl lists this:

Code: Select all

Library name: cdlli30.dll
	ThreadSafe: No
	Function: GetEnvPtr
		Description:
		Export Ordinal: 1403
		Returns
			Number: DWORD
		Parameters
** NOTE the export ordinal, because #1403 (0x57b) is really this function
in cdlli30.dll:
==================================================

Code: Select all

Function Name     : ?ServerGetREB@@YGPAVServerREB@@XZ
Address           : 0x100399d0
Relative Address  : 0x000399d0
Ordinal           : 1403 (0x57b)
Filename          : cdlli30.dll
Full Path         : C:\GuptaTD30\cdlli30.dll
==================================================

So, the solution is to use the pseudo-name for the function, but you must
specify the exp. ordinal -- and be aware that that # is TD version dependent!

In TD v4 cdlli40.dll looks like that function has ord. #1443 (0x5a3).

(I'm using DLL Export Viewer from Nirsoft:
http://www.nirsoft.net/utils/dll_export_viewer.html
to look at the DLLs' contents.)

Best Regards,
Jeff Luther/PC Design
info: www.pulpcards.com/gupta/

Return to “td.sourcecode”

Who is online

Users browsing this forum: [Ccbot] and 1 guest