Click here to Skip to main content
16,008,299 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRelease version works but Debug version does not work Pin
mantrashrim26-Mar-02 8:14
mantrashrim26-Mar-02 8:14 
GeneralRe: Release version works but Debug version does not work Pin
Tim Smith26-Mar-02 8:24
Tim Smith26-Mar-02 8:24 
GeneralRe: Release version works but Debug version does not work Pin
Jim A. Johnson26-Mar-02 8:21
Jim A. Johnson26-Mar-02 8:21 
GeneralRe: Release version works but Debug version does not work Pin
mantrashrim27-Mar-02 6:19
mantrashrim27-Mar-02 6:19 
GeneralOnUpdateXXX(CCmdUI *pCmdUI)! ! ! Pin
BlackSmith26-Mar-02 7:31
BlackSmith26-Mar-02 7:31 
GeneralRe: OnUpdateXXX(CCmdUI *pCmdUI)! ! ! Pin
Joaquín M López Muñoz26-Mar-02 9:10
Joaquín M López Muñoz26-Mar-02 9:10 
QuestionCallback f(x)'s? Pin
Joan M26-Mar-02 6:54
professionalJoan M26-Mar-02 6:54 
AnswerRe: Callback f(x)'s? Pin
Joaquín M López Muñoz26-Mar-02 7:04
Joaquín M López Muñoz26-Mar-02 7:04 
There's some terminology confussion here. What is commonly called a prototype is the particular form (or signature) of a function, i.e. its arguments and return type. So these two functions have the same protoype:
int f(double x,int n);
int g(double y,int m);
So, "instantiating a function" makes little sense. You can have one or several (as many as you want, for that matter) functions meeting a certain protoype. You cannot "instantiate" them at run-time: the functions you have are the functions you wrote in your code, period.
That said, for your particular problem I'd approach it like this: Have one callback function with the given prototype (let's call it Callback) and provide it as many times as you need to AdsSyncAddDeviceNotificationReq, specifying different "addresses" in each invocation. These addresses (and all of the other parameters if you like) can be retrieved from a .INI file without having to recompile the code. Now, in the code of Callback just do what you are supposed to based on the particular AsmAddr * passed, behaving as if there were no other notification requests registered. Everything will work fine as long as different invocations to Callback with different AsmAddr * parameters don't access common data.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
General(repost) CriticalSection Question Pin
ChiYung26-Mar-02 6:34
ChiYung26-Mar-02 6:34 
GeneralRe: (repost) CriticalSection Question Pin
Le centriste26-Mar-02 6:35
Le centriste26-Mar-02 6:35 
GeneralRe: (repost) CriticalSection Question Pin
Tomasz Sowinski26-Mar-02 11:35
Tomasz Sowinski26-Mar-02 11:35 
GeneralEdit Boxes Pin
26-Mar-02 6:33
suss26-Mar-02 6:33 
GeneralRe: Edit Boxes Pin
Mazdak26-Mar-02 8:03
Mazdak26-Mar-02 8:03 
GeneralBitmaps Pin
26-Mar-02 5:52
suss26-Mar-02 5:52 
GeneralBitmaps Disappearing Pin
26-Mar-02 4:47
suss26-Mar-02 4:47 
GeneralRe: Bitmaps Disappearing Pin
dazinith26-Mar-02 5:53
dazinith26-Mar-02 5:53 
GeneralRe: Bitmaps Disappearing Pin
26-Mar-02 6:02
suss26-Mar-02 6:02 
GeneralRe: Bitmaps Disappearing Pin
Joaquín M López Muñoz26-Mar-02 6:54
Joaquín M López Muñoz26-Mar-02 6:54 
Generalentry-point and UNICODE Pin
Jean-Michel LE FOL26-Mar-02 4:28
Jean-Michel LE FOL26-Mar-02 4:28 
GeneralRe: entry-point and UNICODE Pin
Tim Deveaux26-Mar-02 4:50
Tim Deveaux26-Mar-02 4:50 
GeneralWM_LBUTTONDOWN Pin
NC26-Mar-02 3:26
NC26-Mar-02 3:26 
GeneralRe: WM_LBUTTONDOWN Pin
26-Mar-02 3:42
suss26-Mar-02 3:42 
GeneralRe: WM_LBUTTONDOWN Pin
NC26-Mar-02 4:13
NC26-Mar-02 4:13 
GeneralRe: WM_LBUTTONDOWN Pin
Carlos Antollini26-Mar-02 3:45
Carlos Antollini26-Mar-02 3:45 
GeneralRe: WM_LBUTTONDOWN Pin
NC26-Mar-02 4:14
NC26-Mar-02 4:14 

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.