|
by: JC |
last post by:
How does garbage collection work in C# and VB.NET for data returned from COM
object? For example, a COM object written in C++ returns a SAFEARRAY to C#
or VB.NET, will this SAFEARRAY (mapped to type in C# or VB.NET) be garbage
collected? Similarily, if C# or VB.NET pass SAFEARRAY to the COM object via
COM method invocation, will this SAFEARRAY be garbage collected after the
call?
My guess to answers for both questions is yes. Thanks.
|
by: weixian_shen |
last post by:
I'm trying to call my DLL written in C, and got the error: "Cannot
marshal field 'b' of type 'mystruct': There is no marshaling support
for this type." The 2 functions in the DLL are:
void unpack(mystruct* str, void* in_buf);
void pack(mystruct* str, void* out_buf);
The data structure is as follows:
typedef struct
|
by: Rob Edwards |
last post by:
When trying to add the Microsoft CDO for Exchange Management Library (aka CDOEXM.dll) I receive the following message:
"A reference to 'Microsoft CDO for Exchange Management Library' could not be added. Converting the type library to a .Net assembly failed. A depended type library 'CDO' could not be converted to a .NET assembly. A dependent type library 'ADODB' could not be converted to a .NET assembly. Item has already been added."
...
|
by: Nataraj1978 |
last post by:
I have a requirement to use a dll written in Visual C++ 6.0 in my C#
application. In order to establish the link between my application and the
dll, I have written a ATL COM Component in Visual C++.NET . This COM component is referenced in my C# application. The COM
component statically links with the 6.0 dll.
I am facing problems in passing data from C# to the dll through the COM
component.
Description:
1. The dll exposes a function...
|
by: Richard Collette |
last post by:
Hi,
I have a service, that runs perfectly when executed outside of the web
service environment. When called as a web service I get the exception
listed below sporadically. A call to the web method may succeed one time and
not another. I cannot find any reason why it would work one time and not
another. The exception occurs every two or three calls to the web method.
The service utilizes a COM component provided by PeopleSoft...
|
|
by: Don.Leri |
last post by:
Hi,
I have a logger.dll (unmanaged c++ dll compiled in vs2005).
I have a C# interop to use that dll in managed code implemented in
Interfaces.dll (used by other C# dlls).
I also have a number of other C# dlls referencing Interfaces.dll and
using logger.dll interop for logging.
|
by: John |
last post by:
I would like to ask a question that is obvious to all people porting
applications from the "traditional" C\VB6 interop scheme choosing C# vs
VB.NET.
We have a math library in C which ubiquitously takes a float* which
represents an array of floats. If the memory is allocated by the client,
in C# or VB.NET, I assume it must be "fixed" so that the GC does not
move the pointer during the C algorithm. Given that we are choosing
between C#...
|
by: swts |
last post by:
hi,
the following marshaling code gives me an errror of "type packet cannot be marshaled as an unmanaged structure; no meaningful size or offset can be managed".
public static byte StructureToBytesArray(object obj)
{
int len = Marshal.SizeOf(obj);
byte arr = new byte;
IntPtr ptr = Marshal.AllocHGlobal(len);
Marshal.StructureToPtr(obj, ptr, true);
|
by: =?Utf-8?B?SGVyYg==?= |
last post by:
In trying to write VB.Net code to control MSProject 2003 it was recommended
that I record a macro in MSProject and transfer the code to VB.Net. When
recording the FileSaveAs (to the project server) I get the following:
FileSaveAs(Name:="<>\MyProject.Published", UserID:="", DatabasePassWord:="",
FormatID:="")
However, this gives me the "useful" error message "An unexpected error
occurred with the method." when applied to my application...
|
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: 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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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.
|