TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
vijaya.nutakki
NA
23
0
structures as out parameters of Unmanaged functions
Sep 30 2003 8:40 AM
I have to invoke a dll fucntion of unmanaged code which passes a pointer to the structure to the callback fucntion. In that callback fucntion, I ought to collect the passed values of the structure fields. the structure definition is typedef struct pborca_direntry { CHAR szComments[PBORCA_MAXCOMMENT + 1]; LONG lCreateTime; LONG lEntrySize; LPSTR lpszEntryName; PBORCA_TYPE otEntryType;} PBORCA_TYPE is a enum I've used a class in managed code equivalent to the above structre defined as follows [StructLayout( LayoutKind.Sequential,CharSet=CharSet.Ansi)] public class ORCA_Dir { //[MarshalAs( UnmanagedType.ByValTStr, SizeConst=20000 )] public string commnts; public int lCreateTime; public int lEntrySize; //[MarshalAs( UnmanagedType.LPStr)] public string lpszEntryName; //public int otEntryType; public Ptype pt;//enum } I've invoked the callback through a delagate too. It's executing finely.The unmanaged dll function is entering into the my managed defintion of callback fucntion. But when I'm atttempting to retrieve values of the above defined structure in the callback fucntion(DEFINED IN THE MANAGED CODE), it's showing me the error "Identifier out of scope". Please suggest me a solution at the earliest.
Reply
Answers (
0
)
Showing VB6 forms via ActiveX dll
COM Addin (developed in VB.NET)