|
by: Nuno Esculcas |
last post by:
Hello,
I come from C++ and i now have to work with C#, and someone tell me that
bye bye pointers but i think this is not true, i must convert a DIB image in
something that i can use in C# (like Image or Bitmap) and the only thing i
can do is a DIB into a IntPtr (a pointer). I do this with the platform
invoke method of Win32:
internal static extern int GdipCreateBitmapFromGdiDib( IntPtr bminfo,
|
by: Christian Westerlund |
last post by:
Hi!
I'm trying to use P/Invoke and a Method which takes an IntPtr where I am
supposed to put an address to a method which the native method will use
to communicate back to me. How do I convert a method to an IntPtr?
/ Christian
|
by: Tamir Khason |
last post by:
I have a pointer to array and I want to apply indexing to this Array so I
have function (name it IntPrt Func) to go to certain member I can use (as
C++) Func, but in C# I recieve an error "Cannot apply indexing with to
an expression of type 'System.IntPtr'".
How to get rid of it?
TNX
--
|
by: Alex Sedow |
last post by:
Why explicit conversion from SomeType* to IntPtr is not ambiguous (according
to standart)?
Example:
// System.IntPtr
class IntPtr
{
public static explicit System.IntPtr (int);
public static explicit System.IntPtr (long);
|
by: active |
last post by:
I downloaded the Win32 Library which saved me MUCH work.
Some (All?) of the returned handles are typed int.
As I used them I often changed them in my copy of win32 to IntPtr because an
argument that used it was typed IntPtr.
Now I wonder if a Handle make more sense being an integer or an IntPtr.
I believe it's really an index rather than a pointer so Integer seems to
|
|
by: Jørn Jensen |
last post by:
Hey!
I have an issue with creating bitmap from an IntPtr. The IntPtr is created from a Twain scanner, which seem to work perfectly in it's original state (the app is originally written by somebody else). It's when I add the I get an error.
Extracts of my code and the error statement from the Visual Studio Debug bellow:
Select Case cmd
Case TwainCommand.CloseRequest
EndingScan()
|
by: pigeonrandle |
last post by:
Hi,
I'm trying to convert the following line to c# from VB6
If hrRapiInit >= 0 Then 'SUCCEEDED
where hrRapiInit is declared as a Long.
In c#, hrRapiInit must be declared as an IntPtr to fit in with the dll
function i have imported, but obviously, the line
|
by: dcurington |
last post by:
I have to call a function. This is from the SDK:
INT is_GetActSeqBuf (HIDS hf, INT* pnNum, char** ppcMem, char** ppcMemLast);
I have demo C# code that works. Here is the prototype:
private static extern int is_GetActSeqBuf (int hCam, ref int pnNum, ref IntPtr ppcMem, ref IntPtr ppcMemLast);
And this is the way it is used in the C# code.
IntPtr pMem = new IntPtr();
IntPtr pLast = new IntPtr();
|
by: Charming12 |
last post by:
Hi All,
I have a strange problem and due to my inefficiency with IntPtr i am unable to figure it out.
I have an structure something like:
public struct Detail
{
public int age;
public Detail(int _age)
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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: 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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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.
|