Click here to Skip to main content
15,890,845 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MSFLXGRD problem in 64bit machine (MFC/C++) Pin
«_Superman_»28-Jan-09 23:50
professional«_Superman_»28-Jan-09 23:50 
GeneralRe: MSFLXGRD problem in 64bit machine (MFC/C++) Pin
raesa29-Jan-09 0:35
raesa29-Jan-09 0:35 
GeneralRe: MSFLXGRD problem in 64bit machine (MFC/C++) Pin
«_Superman_»29-Jan-09 1:28
professional«_Superman_»29-Jan-09 1:28 
GeneralRe: MSFLXGRD problem in 64bit machine (MFC/C++) Pin
raesa29-Jan-09 18:21
raesa29-Jan-09 18:21 
QuestionCalling a function from another program Pin
Tom Hubin28-Jan-09 21:17
Tom Hubin28-Jan-09 21:17 
AnswerRe: Calling a function from another program Pin
Stuart Dootson28-Jan-09 22:14
professionalStuart Dootson28-Jan-09 22:14 
GeneralRe: Calling a function from another program Pin
Tom Hubin29-Jan-09 19:06
Tom Hubin29-Jan-09 19:06 
GeneralRe: Calling a function from another program Pin
Tom Hubin29-Jan-09 19:25
Tom Hubin29-Jan-09 19:25 
Hello Stuart,

Well, I guess my first reply to you is lost in cyberspace. I'll try again.

BTW, I am using c++ in Visual Studio 2003.

The procedure that you suggest makes sense to me. I also used some of the keywords to find help topics. These also agreed. However, as you well know, the devil is in the details.

I am getting two warnings and cannot figure out why. Below are my brief header and cpp files and the warnings. What am I missing? Ignore the third warning.

I would not normally worry about a couple of warnings but I am also having errors compiling the calling program. So I am wondering what I need to specify to create the library here and how to import it at the calling end.

Tom Hubin
thubin@earthlink.net

**************************************************

// public.h

#ifndef __PUBLIC_H__
#define __PUBLIC_H__

//#pragma once

#ifndef PLUGIN_API
#define PLUGIN_API __declspec(dllimport)
#endif

PLUGIN_API int DoubleIt(int aaa);

#endif // __PUBLIC_H__

**************************************************

// public.cpp

#include "stdafx.h"
#include "dbg.h"

#define PLUGIN_API __declspec(dllexport);

#include "public.h"

PLUGIN_API int DoubleIt (int aaa)

{
int bbb ;

bbb = 2*aaa ;

return(bbb);
}

**************************************************

Output Window Compiling...
stdafx.cpp
Compiling...
XMLProfile.cpp
Utility.cpp
public.cpp
c:\CNC\Mach3Development\SDK2.62.00\th3dVid\public.h(12) : warning C4091: '__declspec(dllexport ) ' : ignored on left of 'int' when no variable is declared
c:\CNC\Mach3Development\SDK2.62.00\th3dVid\public.cpp(14) : warning C4091: '__declspec(dllexport ) ' : ignored on left of 'int' when no variable is declared
PluginTestDlg.cpp
dbg.cpp
CustomPluginImpl.cpp
c:\CNC\Mach3Development\SDK2.62.00\MachIncludes\Mach4View.h(18) : warning C4192: automatically excluding 'IServiceProvider' while importing type library 'ShockwaveFlash.ShockwaveFlash'
CustomPlugin.cpp
Generating Code...
Compiling resources...
Linking...
Creating library Debug/CustomPlugin.lib and object Debug/CustomPlugin.exp
Performing Post-Build Event...
1 file(s) copied.
Results Build log was saved at "file://c:\Cnc\Mach3Development\Sdk2.62.00\th3dVid\Debug\BuildLog.htm"
CustomPlugin - 0 error(s), 3 warning(s)

**************************************************
GeneralRe: Calling a function from another program Pin
Stuart Dootson29-Jan-09 23:22
professionalStuart Dootson29-Jan-09 23:22 
GeneralRe: Calling a function from another program Pin
Tom Hubin30-Jan-09 11:18
Tom Hubin30-Jan-09 11:18 
GeneralRe: Calling a function from another program Pin
Stuart Dootson31-Jan-09 0:00
professionalStuart Dootson31-Jan-09 0:00 
AnswerRe: Calling a function from another program Pin
«_Superman_»28-Jan-09 22:14
professional«_Superman_»28-Jan-09 22:14 
QuestionHow can set UP and DOWN arrow in header of CListCtrl? [modified] Pin
Le@rner28-Jan-09 19:39
Le@rner28-Jan-09 19:39 
AnswerRe: How can set UP and DOWN arrow in sorted column in CListCtrl? Pin
SandipG 28-Jan-09 19:45
SandipG 28-Jan-09 19:45 
AnswerRe: How can set UP and DOWN arrow in header of CListCtrl? Pin
Stuart Dootson28-Jan-09 21:57
professionalStuart Dootson28-Jan-09 21:57 
Questionhow to force paint a view in MFC. Pin
VC++Maniac28-Jan-09 19:24
VC++Maniac28-Jan-09 19:24 
AnswerRe: how to force paint a view in MFC. Pin
SandipG 28-Jan-09 19:42
SandipG 28-Jan-09 19:42 
AnswerRe: how to force paint a view in MFC. Pin
CPallini28-Jan-09 21:08
mveCPallini28-Jan-09 21:08 
GeneralRe: how to force paint a view in MFC. Pin
nitin328-Jan-09 21:53
nitin328-Jan-09 21:53 
QuestionRe: how to force paint a view in MFC. Pin
Nishad S28-Jan-09 22:16
Nishad S28-Jan-09 22:16 
GeneralRe: how to force paint a view in MFC. Pin
Hamid_RT29-Jan-09 1:03
Hamid_RT29-Jan-09 1:03 
GeneralRe: how to force paint a view in MFC. Pin
CPallini29-Jan-09 2:15
mveCPallini29-Jan-09 2:15 
JokeRe: how to force paint a view in MFC. Pin
prasad_som28-Jan-09 23:25
prasad_som28-Jan-09 23:25 
AnswerRe: how to force paint a view in MFC. Pin
Hamid_RT29-Jan-09 1:06
Hamid_RT29-Jan-09 1:06 
QuestionHow to Set Tab order for dynamically created controls like CButton,CEdit Pin
Abhijit D. Babar28-Jan-09 18:45
Abhijit D. Babar28-Jan-09 18:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.