Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Creating client for FrameMaker 8 using C++

New Here ,
Jun 27, 2008 Jun 27, 2008

Copy link to clipboard

Copied

Hi all,
Now I'm creating client for FrameMaker 8 using FDK 8 .

It populates menu during runtime for accessing another Content management system functionality.all samples in FDK\samples is in C source code.
I need to write C++ source for generate client to implement COM component.

Can any one have sample C++ source code for FDK client.

I'm using FrameMaker 8,FDK 8 and Win 2003 server.

Thanks in advance.

Views

554
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 27, 2008 Jun 27, 2008

Copy link to clipboard

Copied

The FDK is a "C" library. I believe that it may be possible to use these functions in C++ code, but I have not seen examples of this. When I need to make calls to C++ (MFC) code, I develop that code as a separate DLL and make calls to the exported functions using LoadLibrary calls.

Cheers,

...scott

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 30, 2008 Jun 30, 2008

Copy link to clipboard

Copied

Hi Scott,

This is a very interesting approach. I am in the early stages of getting up to speed with the FDK myself and have been wrestling with how to implement FMC code.

The FDK documentation contains a chapter that implies the only way to interact with MFC code is to create a DDE server and pass messages between the FDK and the external application.

Am I correct to assume that your approach gets around the need to implement a DDE server? Any additional details you can pass along would be most helpful and appreciated,

Martin R. Smith
martin.smith@golehtek.com

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 30, 2008 Jun 30, 2008

Copy link to clipboard

Copied

Hi scott,
I'm new to FDK and VC++ programming, If you have any sample code can you send me by mail. It would be most helpful and greatly appreciated.

Thanks
karthik
rkarthik27@gmail.com

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 01, 2008 Jul 01, 2008

Copy link to clipboard

Copied

LATEST
I can't provide all of the necessary code, but you should be able to make some progress with the following info ..

1) Create the MFC DLL and provide an "exported" function that will be called from your FDK code. I believe that there are a number of ways to do this, but I do it by adding the function name to the EXPORTS section of the project's DEF file.

2) Add the RunDllFunction (below) to your FDK project. You'll need to tweak this function to accommodate the parameters you want to pass from the FDK code to the external DLL. You also need to change the function callback prototype (line that starts with "typedef int") and the actual function call("lpfnDllFunc1") so the parameter number and types all match.

Give it a whirl and see how it goes. :)

...scott

//=================================================
IntT
RunDllFunction(StringT dllFile, StringT dllFunction, StringT paramOne, StringT paramTwo, IntT paramThree)
{
typedef int (CALLBACK* LPFNDLLFUNC1)(LPTSTR, LPTSTR, int);
int ret = 0;
if (Pt_FileExists(dllFile)) {
LPFNDLLFUNC1 lpfnDllFunc1;
HINSTANCE hGetProcIDDLL = LoadLibrary(dllFile);
if (hGetProcIDDLL) {
lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hGetProcIDDLL, dllFunction);
if (lpfnDllFunc1) {
ret = lpfnDllFunc1(paramOne, paramTwo, paramThree);
}
FreeLibrary(hGetProcIDDLL);
}
else {
F_Printf(NULL, "ERROR: Unable to load DLL! [%s]\n", dllFile);
}
}
else {
F_Printf(NULL, "ERROR: Unable to locate DLL! [%s]\n", dllFile);
}
return ret;
}
//=================================================

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines