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

cfx custom tag using visual c++ 2008 express

New Here ,
Jul 10, 2009 Jul 10, 2009

Copy link to clipboard

Copied

Hi:

I have Visual C++ 2008 express edition to compile my custom cfx tag. Here are my steps:

1. new project -> Win32 -> Win32 Project, enter project name

2. Application Type: DLL, Finish

3. Project -> properties -> C/C++ -> General -> Additional Include Directories includes "C:\ColdFusion8\cfx\include"

4. #include "cfx.h"

4. Finish my code

My problem is my code surely has the "void ProcessTagRequest(CCFXRequest* pRequest)" function, but after I register my cfx, my cfm keeps giving me an error message: "Native CFX library does not have a ProcessTagRequest entry point."

I am guessing it's not a problem in my code, since I could compile my code no any error. I am guessing it's my visual c++ project setting problem, causing coldfusion unable to see my function. Any one has any clue?

Thanks.

TOPICS
Advanced techniques

Views

1.3K

Translate

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 10, 2009 Jul 10, 2009

Copy link to clipboard

Copied

I figured out the problem mysql.

I have to add "extern "C" __declspec( dllexport )" before my ProcessTagRequest function, but I also tried only "__declspec( dllexport )", which doesn't work.

Can anyone explain why I really need the extern "C" to work? The visual c++ documentation states that compiler does not require "extern "C" " to export function. Why do I need that for coldfusion?

Thanks.

Votes

Translate

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 ,
Apr 05, 2014 Apr 05, 2014

Copy link to clipboard

Copied

LATEST

many years later...

the "extern "C" " ensures, your entry points name is really "ProcessTagRequest", because some compiler add letters or other characters to it.

PS: You can use dumpbin.exe /EXPORTS your.dll to check the names.

Votes

Translate

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
Resources
Documentation