all groups > dotnet interop > april 2006 > threads for april 15 - 21, 2006
Filter by week: 1 2 3 4 5
Interop stops working with new version of COM library
Posted by Jon at 4/21/2006 12:48:01 PM
We have customers developing custom applications with a .NET API we have
provided. Internally, the API uses COM interop to talk to a legacy COM
interface. The problem is that now we want to upgrade the COM library to the
latest version. Ideally, we would like to do this without requiring th... more >>
Can GetActiveObject find multiple running objects?
Posted by Christopher at 4/21/2006 2:19:02 AM
Hi,
I can use Marshal.GetActiveObject to attach to a running instance of some
application. I can then use Type.InvokeMember to control it.
My question is how to attach to a SPECFIC running instance of some
application when there may be two instances running.
How do I distinguish between them?... more >>
Marshalling "packed" struct
Posted by Marcin Rzeznicki at 4/21/2006 1:37:02 AM
Hello,
What is the best approach to marshal structure declared like:
typedef struct tag_SCRIPT_CONTROL {
DWORD uDefaultLanguage :16;
DWORD fContextDigits :1;
DWORD fInvertPreBoundDir :1;
DWORD fInvertPostBoundDir :1;
DWORD fLinkStringBefore :1;
DWORD fLinkStringAfter :1;
DWORD... more >>
GetWindowPlacement problem. RECT members are all zeroes
Posted by Thue Tuxen Sørensen at 4/20/2006 6:29:02 PM
Hi !
Ive been wrapping GetWindowPlacement function of the Win32 API.
The function call succeeds and returns != 0 and the showCmd member looks
correct.
The problem is that all coordinates in the RECT (rcNormalPosition) are 0
when the functions returns.
It all looks like this:
[DllImport(... more >>
Excel: Custom Style Color
Posted by Josef Brunner at 4/20/2006 3:50:32 PM
Hi,
I need to create a Styel object for my Excel Workbook that contains a
special color. I only know the html-like string for this color. Like
Style.Interior.Color = "#FFFFF"
Any help is appreciated,
Kurt
... more >>
SDIOCam.dll and Pinvoke
Posted by Gusa at 4/20/2006 1:21:01 PM
Hello
I am trying to use the VEO camera api to take a snapshot.
The call to the method goes OK and I get a result indicating that the call
was ok.
However the dll is supposed to write a file with the picture and there is no
file.
I cannot find it anywhere.
can anybody help with this... more >>
Assembly registration - interface missing
Posted by Peter Hase at 4/20/2006 12:41:24 PM
Hi,
I register an assembly with regasm useally like
regasm L:/Common/BIN/ComWrapper.dll /tlb:L:/Common/BIN/ComWrapper.tlb
/codebase
This works excellent most time, but on a few machines there's
the problem, that the interface definitions are incomplete.
If the coclass is activated via ... more >>
E_FAIL
Posted by danjones.email NO[at]SPAM gmail.com at 4/20/2006 12:29:39 PM
I am trying to use AccessibleObjectFromWindow() and it keeps returning
E_FAIL. This seems to be an ambiguous error message and i feel like i
have tried everything. I used Spy++ to verify that i am giving it the
correct handle and several sources have told me that I do have the
correct dwObject... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Calling a C++ managed code from C#
Posted by Tooraj at 4/20/2006 9:49:47 AM
Hi,
I have wrapped an unmanaged C code in a C++ wrapper. When I call the methods
in wrapper everything works perfect but when I add a ref to the wrapper
within my C# app and call the wrapper's method there I get a File Not found
exception:
An unhandled exception of type 'System.IO.FileNotFoun... more >>
fix lenght char c parameter
Posted by cheloman12 at 4/20/2006 7:21:03 AM
HI,
I’m trying to get a fix length string from an unmanaged C dll.
This is an example of the method I must invoke:
typedef bool __stdcall (*Add3_t)(char *, char *, char *);
Add3_t Add3 = (Add3_t) GetProcAddress(hInstance, "Add3");
// Execute the function
char szResul... more >>
Using .NET dll from VB6
Posted by uwe.braunholz NO[at]SPAM hotmail.de at 4/20/2006 7:11:37 AM
Hello,
I want to use a .NET classlibrary from my VB 6-Application. There are
some tutorials for that, but I want to do some specials.
In some thread I read, it would be possible to place the .net dll in
the apps-dir and I would not have to register the dll on the target
system.
How can I... more >>
Making [DllImport(...)] configurable at runtime in C#
Posted by It's the Angry Snapping Goose at 4/19/2006 9:51:05 PM
Hi All:
Can the following be done in C#
Go from:
[DllImport("test.dll")]
extern "C" int testFunc(int y);
To:
[DllImport(dllNameVariable)]
extern "C" int testFunc(int y);
Where "dllNameVariable" is some kind of "string" object that can be
initialized either by looking at an envi... more >>
Accessing core .NET Framework classes from COM
Posted by Zoe Hart at 4/19/2006 5:37:02 PM
Can any of the classes that are part of the .NET Framework be accessed
directly from COM? I.e. are they ComVisible? Or do I need to develop a
custom .NET wrapper which is ComVisible and use that as the middleware
between my COM client and the .NET Framework class?
My specific scenario is th... more >>
Registering .NET assembly that used COM Interop
Posted by DWrek at 4/19/2006 7:48:01 AM
Hello,
I have a .NET assembly that is called from a classic ASP website. Can I
still use XCopy deployment for this assembly if it utilizes COM Interop or do
I need to use RegASM.exe? I plan to deploy the assembly in question to the
"bin" directory of my web application.
Thank you.
... more >>
calling COM objects
Posted by ramaseshan.k NO[at]SPAM gmail.com at 4/19/2006 7:11:21 AM
Hi
I am c# newbie coming from c++ background. I need to call a COM
object(which was written in VC++) from my c# program.
The c++ application(Let's call it abc) has an .ODL file that defines
the COM interface. It generates a tlb(abc.tlb) file. The application's
COM is registered in the regis... more >>
exception handling
Posted by Vigj at 4/19/2006 5:59:02 AM
Hi
I'm developing a com object (later used by a mfc c++ application) in C#. The
result is a dll that the C++ application loads and from which istantiates
forms, objects etc etc
sometimes C# code throws an exception and c++ code gets killed.
My question is very simple: is there a way to set ... more >>
uninstalling 3rd party application
Posted by Gregory Khrapunovich at 4/18/2006 10:12:59 AM
Hi,
I would like my C# program to uninstall our old installation. Is it possible
from C# to do the same think that user does, i.e get the list of installed
applications (similar to Add/Remove programs), select an application, and
command it to uninstall?
I am using Visual Studio 2003, but ... more >>
Enumerating MarshalByRefObject objects in VB script
Posted by Eugene Pavlov at 4/17/2006 7:20:04 AM
Hi,
I have the following interfaces in my C# project:
[Guid("EFA1BE2F-92E3-4c69-9204-AE77D31A1E22")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IMyEnumerable
{
[DispId(-4)]
IEnumerator GetEnumerator(... more >>
FASTEST way to write in Excel - VB.NET
Posted by Niyazi at 4/17/2006 5:47:01 AM
Hi,
I have a data table that contains around 9000 rows,
And I am sending the data into pre-formated Excel sheet
and you can see my code below:
Dim myRow as Integer = 13
Dim rowNTMS as DataRow
With oWB.ActiveSheet
For Each rowNTMS In ExcelTABLE.Rows
.Cells(myRow, 1).value = rowNT... more >>
|