Solved

Question  on COM

Posted on 1998-11-16
1
153 Views
Last Modified: 2013-11-20
hi ,
       I  have an  IDL file .I want  to know  how  to
declare  a  function pointer  as a  function argument in
the IDL file  .
 
when I declared it like -->

   int Save([in] FILE *fp , unsigned int (*pFn)(const void *buffer, size_t size, size_t count, FILE *stream));      

The MIDL compiler ignores  this  declaration  .

Here Save Method accepts a  file pointer and also  
a function pointer as an argument .However when I declared
it this way , the MIDL compiler ignored it .

I want  to  know  how  to  declare it  so  that  the
MIDL compiler accepts  it  .

If  you have any clue  to this  problem , please
let me know .


Thanks  in advance ,

bye
sankar



0
Comment
Question by:sankar012898
1 Comment
 
LVL 3

Accepted Solution

by:
plaroche earned 100 total points
Comment Utility
I don't think this can be done as explicitly, there's no real way for com to marshall this across interfaces.  You could pass this around as a (void*) and re-cast it on the server side.
Also, passing a function pointer seems a bit "non-com".  Your object you pass an interface pointer, which the server could use to call back.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video discusses moving either the default database or any database to a new volume.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now