Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Question  on COM

Posted on 1998-11-16
1
Medium Priority
?
166 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 300 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

636 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