New Message on dotNET User Group Hyd

How to use DllImport

Reply
  Reply to Sender   Recommend Message 1 in Discussion
From: AnupShinde

Hi,

I have to access some methods in a DLL using C#.NET. The DLL is not a COM DLL, thats why I am using DllImport.

But that doesnot seem to be working properly.

Please see the following information about the structures used in the DLL. (Got it from a Win32 exe source code that utilizes the DLL)

(Copy all text and paste in Notepad without word-wrap, to view properly)

While converting the structure to a C# struct, I changed char[] to string, BYTE to byte, and DWORD,WORD,UINT to Int32.

The method executes fine, but none of the parameters are changed.

I tried using TLBIMP, but that doesnt seem to help. Please help me out.

Regards,
Anup Shinde.


----------------------------------------------------------------Structure Information -------------------------------------------------------------

 

 


  //UINT DSSGetHeaderInfoEx(HPSTR lpFileName, DSS_HDRINFOEX * lpDSSInfoEx) ;
  //UINT DSSGetHeaderInfo(HPSTR lpFileName, DSS_HDRINFO * lpDSSInfo) ;

 

//////////  // DSS Header Information Structure
//////////       typedef struct
//////////         {
//////////          DWORD  wJobNumber;   // Binary Job Number
//////////          WORD   wProcess ;   //
//////////          char   szRecLength[6] ; // Recorded Size (ASCII) hh:mm:ss
//////////          char   szRecEndDate[6] ; // Recorded Date (ASCII) yy:mm:dd
//////////          char   szRecEndTime[6] ; // Recorded Time (ASCII) hh:mm:ss
//////////          BYTE   bAttribute ;  // DSS File Attributte
//////////          BYTE   bPriority ;   // DSS File Priority (0-15)
//////////
//////////         } DSS_HDRINFO;

 

 

 

 


//////////  // DSS Header Information Extension Structure
//////////  typedef struct
//////////    {
//////////     BYTE  bRecMode ;    // Record Mode
//////////     CHAR  szAuthor[16];   // Recorder ID
//////////     DWORD  dwJobNumber;   // Job Number
//////////     WORD  wObjectWord ;   // Objcect Word
//////////     WORD  wProcess ;    // Process Word
//////////     WORD  wStatus ;    // Typsit Status
//////////     CHAR  szRecLength[6] ;  // Recorded Length
//////////     CHAR  szRecEndDate[6] ;  // Recording End Date
//////////     CHAR  szRecEndTime[6] ;  // Recording End Time
//////////     CHAR  szRecStartDate[6] ;  // Recording Start Date
//////////     CHAR  szRecStartTime[6] ;  // Recording Start Time
//////////     BYTE  bAttribute ;   // DSS File Attribute
//////////     BYTE  bPriority ;    // Recorder Priority 0-15
//////////     CHAR  szTypist[16];   // Typist ID
//////////     CHAR  szWorkType[16] ;  // WorkType ID
//////////     CHAR  szOptionName[8] ;  // Option Item Name
//////////     CHAR  szOptionID[20] ;  // Option Item ID
//////////     CHAR  szOptionName2[8] ;  // Option Item Name 2
//////////     CHAR  szOptionID2[20] ;  // Option Item ID 2
//////////     CHAR  szOptionName3[8] ;  // Option Item Name 3
//////////     CHAR  szOptionID3[20] ;  // Option Item ID 3
//////////     BYTE  bDSSStatus ;   // DSS Status Flag
//////////     BYTE  bPriorityStatus ;  // Message Priority
//////////     DWORD  dwPlaybackPos ;   // End Playback Position
//////////     DWORD  dwExtRecordTime ;  // Recording Milli Time Length
//////////     CHAR  szNotes[100] ;   // Notes
//////////    } DSS_HDRINFOEX;

 


View other groups in this category.

Click Here
Also on MSN:
Start Chatting | Listen to Music | House & Home | Try Online Dating | Daily Horoscopes

To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings.

Need help? If you've forgotten your password, please go to Passport Member Services.
For other questions or feedback, go to our Contact Us page.

If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list.
Remove my e-mail address from dotNET User Group Hyd.

Reply via email to