all groups > dotnet interop > february 2006 > threads for february 22 - 28, 2006
Filter by week: 1 2 3 4
Visual Studio ActiveX import
Posted by Charley at 2/28/2006 8:48:42 PM
Hello,
I'm trying to use an ActiveX object from a c# project in Visual Studio 2005.
I don't understand the difference between adding the .ocx file as a
reference and adding the .ocx file to the toolbox then dropping it on a
form. I can only get functionality working if I add it through the... more >>
Repace doesn't work under Windows 98
Posted by Gregory Khrapunovich at 2/28/2006 6:23:00 PM
I am using Visual Studio 2003 (Framework 1.1) with Windows Forms/C#. At
some point my application executes a simple statement:
string filename = Application.ExecutablePath.Replace(".exe", ".xml");
When I tested the applications under three different operating systems, it
turned out that t... more >>
Posible ServiceBase sample error
Posted by Yanko at 2/28/2006 2:50:34 PM
Hi guys/gals
I'm not versed at all using p/invoke so I don't know how to fix
this:
Given this declarations:
/**************************************/
typedef struct _SERVICE_STATUS {
DWORD dwServiceType;
DWORD dwCurrentState;
DWORD dwControlsAccepted;
DWORD dwWin32ExitCode;
DW... more >>
Insufficient memory to continue the execution of the program.
Posted by lyang at 2/28/2006 11:20:46 AM
I am converting one vs.net 2003 solution to vs.net 2005. The solution
uses one old COM component through Interop. After migration, when I
call the Interop wrapper for the old COM component, I got the following
error message:
Insufficient memory to continue the execution of the program.
I re... more >>
Unmanaged C++ Shell Extension Handler as client to C# COM Object
Posted by gilad at 2/28/2006 11:00:31 AM
Hi, I am trying to get an unmanaged C++ Shell Extension Handler to act
as a COM client to a C# COM object. Since it is recommended to not do
managed Shell Extension Handlers--
http://blogs.msdn.com/junfeng/archive/2005/11/18/494572.aspx
--and since I prefer to program as much in C# as I can,... more >>
Unwrap returns VT_RECORD instead of VT_DISPATCH??
Posted by dnebeker at 2/27/2006 9:31:27 PM
I have a simple managed C++ class that I want to call from unmanaged C++.
Because of DLL Hell, etc I don't want to register it with COM (multiple apps
will use this DLL), and because of the mixed-mode deadlock/loader lock I
can't just export a function and call it (I'm using .NET 1.1).
Tha... more >>
Mixed Assembly Interop
Posted by MichaelG at 2/27/2006 12:42:17 PM
Is it possible to do interop in a mixed assembly in VS2005?
I have an ATL COM object which I want to create and call from a managed
class.
Something like this:-
// ManagedClass.cpp - compile with /clr
#include "NativeATLComObject.h" // compiled without /clr
public ref class Man... more >>
Looping thru collection works in VS2005, not IIS
Posted by Jeff at 2/27/2006 4:14:58 AM
This code works in the VS2005 IDE using the built in web server,
however when I run it on the same machine thru IIS it throws an error.
It's suppose to loop thru all the task in a Microsoft Project file
using C#.
object oAP = objProj.ActiveProject;
object prjTa... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Returning binary data from .Net class to through COM
Posted by Jeremy Lloyd at 2/26/2006 8:26:28 PM
Hi
I would be grateful if someone could point me in the right direction.
I have a COM callable class. In that class I have binary data in a
MemoryStream. How do I return that binary data to the caller? The calling
language is VBS.
Many thanks
Jeremy
... more >>
Retrieving Desktop Icon Positions
Posted by avec.fromage NO[at]SPAM blueyonder.co.uk at 2/26/2006 7:52:16 AM
Hi,
I'd like to be able to read the positions of all the Icons on my WinXP
desktop. I've had a look around to see how to do it and I've come up
with the code below...but it doesn't work. :o(
The x and y properties of my POINT structure are always zero. It seems
the structure isn't gettin... more >>
Loadind freeing reloading an unmanaged dll in c# code
Posted by antoine at 2/24/2006 2:14:12 PM
Hello,
In a managed application (c#) , I load an unmanaged dll (c++), but
during the execution I need to re-init the dll many times, so I tried to
free
the unmanaged dll and reload it after, it seems to work only one time ,
has anyone an explication about potential side effects? let see the ... more >>
PInvok'ing methods with LPCTSTR parametesr
Posted by Ines at 2/24/2006 1:51:58 PM
Hey everyone,
I am running into a problem PInvoking a particular method I expose in a
DLL, that basically configures and starts an ETW session
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/perfmon/base/consuming_events.asp).
The basic method looks like this:
__declspec... more >>
Implementing IActiveScriptSite and IActiveScriptSiteWindow in VB.N
Posted by GeorgeGilbot at 2/24/2006 9:01:28 AM
I am writing a script host in VB.NET by implementing hand written
IActiveScriptSite and IActiveScriptSiteWindow interfaces on a class.
IActiveScriptSite methods are called successfully by a VBScript engine,
however IActiveScriptSiteWindow methods aren't. The consequence of this is
that VBSc... more >>
embedding a type library inside an assembly
Posted by John H at 2/24/2006 8:51:57 AM
Hi,
I deploy .net enterorise servcies dll's to com+ use regsvcs.
How can i do it such that i embedd the type lib into the dll.
I saw /extlb switch but it doesn't take a path?
Regards
John
... more >>
Marshaling char *... HELP, PLEASE!
Posted by Alvaro Enriquez de Luna at 2/24/2006 4:42:17 AM
Hello.
I have a DLL written in C. In this DLL i need a function to modify a
char * passed from a C# program inside a struct. I have reduced the
code to only one struct with one char *, but when i try to call the
funcion, i obtain this exception:
"Cannot marshal field 'str' of type 'memmap': I... more >>
Late binding equivalent
Posted by John at 2/24/2006 1:34:42 AM
Hi
What is the late binding equivalent of the below code?
Many Thanks
Regards
Dim O As Outlook.Application
Dim F As Outlook.MAPIFolder
Dim iCon As Outlook.ContactItem
Dim oContact As Outlook.ContactItem
O = New Outlook.Application
F =
O.Session.GetD... more >>
Overload of Excel Copy from C#
Posted by Oliver Bock at 2/24/2006 12:00:00 AM
According to the Excel manual, there are three variants of the Copy()
method that applies to Chart objects (and others):
Syntax 1: expression.Copy - copied to clipboard
Syntax 2: expression.Copy(Destination) - copies range
Syntax 3: expression.Copy(Before, After) - duplicates... more >>
COM+ LC Event - Transient Subscription (New Issue)
Posted by Blair Allen Stark at 2/23/2006 9:43:27 PM
well I am making progress. . .
Here is where I was going with this. . .
I want an ASP.NET application to fire the event. I want users to be able to
run an app and get a real-time view of certain activities.
with these set in the COM+ Event Class assembly:
<Assembly: ApplicationActivati... more >>
Distributing IAs for Word 2000
Posted by Evan Stone at 2/23/2006 3:53:57 PM
We're having some confusion regarding whether it's legal to generate and
distribute IAs for Office 2000. We would be only deploying them to our
application directory since we want to support XCopy deployment, and the
information up on the Microsoft and MSDN sites is rather... indirect, and
also ... more >>
Late Bound Access to NormalTemplate.Saved property in Word (C#)
Posted by Evan Stone at 2/23/2006 3:22:47 PM
Hi,
How would one go about accessing the Application.NormalTemplate.Saved
property in Word via C# and LATE bound?
I'm currently getting the infamous "do you want to save Normal.dot" error on
certain systems from the following code (it seems to be from fresh
installations of Word, since some... more >>
Threads frozen when using CorBindToRuntimeEx
Posted by dnebeker at 2/23/2006 8:33:20 AM
Sorry, this one is complicated.
I have a normal (completely non-Managed C) C++ app that uses MFC. This app
calls:
CorBindToRuntimeEx(L"v1.1.4322", NULL,
STARTUP_LOADER_OPTIMIZATION_SINGLE_DOMAIN, CLSID_CorRuntimeHost,
IID_ICorRuntimeHost, &ppv);
Once started, it does a LoadLibrary on ... more >>
Native event in C#
Posted by Benny Tops at 2/23/2006 2:13:10 AM
Hi guys,
I'm having a hard time to subscribe to a native event in C#.NET. The
application I'm writing should be able to detect changes in DHCP
parameters. This is done through the following:
DWORD APIENTRY DhcpRegisterParamChange(
DWORD Flags,
LPVOID Reserved,
LPWSTR AdapterName,
... more >>
Interop to C
Posted by mortb at 2/23/2006 12:00:00 AM
Hi!
I'd llike to encapsulate a C function with signature:
char * foo(char * bar)
How would I call this function and how do I free the memory pointer which is
returned?
TIA!
mortb
... more >>
ComException when trying to call Excel.Workbook.SaveAs
Posted by Calvin Willman at 2/22/2006 11:53:58 AM
Hi,
I'm getting the above Exception when trying to call SaveAs() on a Wb, I've
got open. I can call Save() no problem, but wanted to set Filename, etc...
Very new to programming Excel with C#, so not sure what this is about.
Can anyone help.
This is the line causing Exception.
I defi... more >>
Connection Point from MTA to vb.Net
Posted by S Wheeler at 2/22/2006 11:05:53 AM
Hi All -
Have a little problem that I hope someone can help with.
I have a MT com .exe app that fires events (connection points) from a worker
thread which is a COM MTA. It has been working fine with a VB 6 client. I am
trying to port the client to VB.net but I am having problems. The event wi... more >>
Interop properties are prefixed with get_ and set_?
Posted by TDC at 2/22/2006 5:29:22 AM
The C# app consuming this Interop Assembly sees (for example) the
read/write property Field as get_Field and set_Field. Is this normal?
Here is the snippet from the interop assembly:
<ComImport(), TypeLibType(4304),
Guid("3D1A1824-7FE5-46B8-810A-85BC59BD95D3")> _
Public Interface tkResultR... more >>
|