Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / December 2004

Tip: Looking for answers? Try searching our database.

LINEDEVCAPS structure

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fabrizio Camagna - 13 Dec 2004 12:57 GMT
I have to marshal LINEDEVCAPS structure for TAPI in the call to
lineGetDevCaps.

[DllImport("Tapi32.dll",CharSet=CharSet.Auto,EntryPoint="lineGetDevCaps")]
private static extern uint (int hLineApp,uint dwDeviceID,uint dwAPIVersion,
uint dwExtVersion,out IntPtr lpLineDevCaps);

This structure is a variable length one, so i declare the last parameter
like a pointer istead like LINEDEVCAPS so I can allocate
the necessary memory space, but when I call the function a receive (HRESULT
= Bad pointer)
liggett78 - 13 Dec 2004 13:47 GMT
Your declaration is wrong. The last param is not the "out" parameter, rather
"ref" I think.
See Platform SDK:
"Pointer to a variably sized structure of type LINEDEVCAPS. Upon successful
completion of the request, this structure is filled with line device
capabilities information. Prior to calling lineGetDevCaps, the application
must set the dwTotalSize member of this structure to indicate the amount of
memory available to TAPI for returning information."
So you should be allocating memory for it.

Regards, Joerg

> I have to marshal LINEDEVCAPS structure for TAPI in the call to
> lineGetDevCaps.
[quoted text clipped - 7 lines]
> the necessary memory space, but when I call the function a receive (HRESULT
> = Bad pointer)

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.