|
by: C. N. Sridhar |
last post by:
Hi,
I'm writing a wrapper to a win32 dll in C#. I need to call
a method in DLL which has a Variant type reference
parameter.
How to marshal variant type from win32 (unmanaged code)
to C# (managed code)?
I tried using Marshal.GetObjectForNativeVariant(), but of
no use.
|
by: PHil Coveney |
last post by:
Hello,
I am having difficulty marshalling structures when calling DeviceIoControl.
I am importing this Win32 function as
static extern int DeviceIoControl (int hDevice,
int dwIoControlCode,
ref int lpInBuffer,
|
by: Dave |
last post by:
I wish to call a COM Object which has a parameter of type VARIANT* on
a method call from C#
The COM Method :-
STDMETHODIMP CClassType::GetTypeIDs(VARIANT * TypeIDs)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())
if (DeviceTypeIDs->vt != (VT_I2|VT_ARRAY))
return E_INVALIDARG ;
VARIANT* ptr ;
|
by: MuZZy |
last post by:
Hello,
I am probably facing a sort of language barrier, but i can't really get what
'marshalling' is in terms of .NET
Is it a kind of type casting? And when do you use it?
Thank you,
Andrey
|
by: Rookie |
last post by:
Hi,
I had a question on DllImport. On importing a function from a VC++ dll
using DllImport (to a C# program), the function argument data types
and the return types may be of a type that is not supported by C#. In
this case if I am not mistaken the system performs default marshalling
- matching the data types to its most similar equivalent in C#. Is
this right?
Also, I presume this can be overridden by using MarshalAs. Is this
|
|
by: Andrew S. Giles |
last post by:
Helo all,
I have a standalone unmanaged C++ application that makes a call on another
standalone COM server, which raises an event that should be handled in C#.
I am trying to send: unsigned long, double, BSTR, and VARIANT.
The unsigned long, double, and BSTR (marshalled to System.String) work just
fine and dandy.
|
by: BartMan |
last post by:
Greetings,
When working with managed c++, do you have to do anything special when going
from simple types from managed to unmanaged and vice versa. Or is
marshalling handled automatically for you?
I have seen from several posts that you have to do special conversions for
strings, but what about the other types such as int, long,ect. In my case I
want to save it as a member variable from a managed class into an unmanaged
class's.
|
by: GianPiero Andreis |
last post by:
Hello All,
let me pose a simple question about combobox and the CB_INSERTSTRING
message.
Suppose for instance that I already have a combobox handle, how can I
declare and use the SendMessage function just for insert a new item into the
combobox ?
Of course, the combo box DO NOT belong to my process, so I can't use the
standard properties of that class.
In fact, I need to "put" a new entry in the combo box of IExplorer.
EnumWindows get...
|
by: WTH |
last post by:
....and you get safe array type mismatch exceptions from the marshaller.
I have a C++ COM object (thank God I could find the source) that was
declared properly in the IDL for and requiring a VARIANT*,
everytime I tried to use this object from C# the marshaller would throw up
marshalling the return value. Now, I should mention that this COM object
works great in when used by C++ code which has to marshall the data as well.
I googled...
|
by: calenlas |
last post by:
Hi all,
I'm taking my first steps into C# <--C++ DLL Interop and
unfortunately I've run into (what seems to be) a very complicated case
as my first task. Perhaps someone here can help me.
I need to pass an array of RADIO_INFO2 structures to be filled by a
function in the DLL. This is how the structure is defined in the C++
example that comes with the DLL:
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|