473,401 Members | 2,127 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,401 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 888

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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.