473,387 Members | 1,374 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

WinAPI function parameters

Hi,

I want to call this function: SetCommState(HANDLE hFile, LPDCB lpDCB)
I'm writing a managed C++ wrapper, and i only have a managed DCB
struct. This is required for the
[StructLayout(LayoutKind::Sequential)] attribute to work.
So, when calling SetCommState, it always returns false.
Should i pin the pointer passed to the function when calling?

Thanks!
Nov 17 '05 #1
0 887

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Joel ELISE | last post by:
Hi, I'd like to know if it's possible to show a picture in a dialog box. I'm programming in C language using WinAPI (for MS Windows). If it's possible, please, let me know how. Everything I...
1
by: Qindong Zhang | last post by:
I have a API function which declared in VC++ like this: DLLimport BOOL WINAPI bl_HERA16_SetPlayBuffer(int iChannel,BYTE **bpBuffer); How could I declare and call this function in C#. I have...
1
by: John Hann | last post by:
I'm trying to extend the version of IAS server included in Windows Server 2003 with a custom DLL. IAS, unfortunately, insists on loading Extension DLLs with the Win32 LoadLibrary() function, which...
1
by: MuZZy | last post by:
HI, I would really appreciate some hwlp with this: Here is the WinAPI struct used in call to winapi function wavInGetDevCaps: typedef struct { WORD wMid; WORD wPid; MMVERSION...
0
by: CeZaR | last post by:
Hi, I want to call this function: SetCommState(HANDLE hFile, LPDCB lpDCB) I'm writing a managed C++ wrapper, and i only have a managed DCB struct. This is required for the attribute to work....
7
by: jg | last post by:
or would I have to use C# or C++?
0
by: jg | last post by:
just for those who have to deal with legacy application that supports COM, OCX, and WINAPI(_stadcall) - c-style?, I worked out the COM interface for function out array parameters. For example...
6
by: ppuniversal | last post by:
I am facing a problem: I have say 3 files : ABC.h ----- this file has the function prototypes ABC.cpp ------ the definitions of the functions ABC_Test.cpp ------- the file with main()...
5
by: Michel | last post by:
Hi, I tried to use Winapi floodfill function with an Access Form. Here is the code in a click-button sub : Dim hDC As Long Dim hBrush As Long Dim hobj As Long Dim ret As Long
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.