Solved

Question  on COM

Posted on 1998-11-16
1
157 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
plaroche earned 100 total points
ID: 1324795
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
iSeries FTP Exit Program 8 163
Whole sheet autoscrub still needed 19 53
sameEnds challenge 3 187
changeXy challenge 13 93
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 …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

756 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