all groups > dotnet interop > september 2004 > threads for september 1 - 7, 2004
Filter by week: 1 2 3 4 5
OpenMutex fails with ERROR_ACCESS_DENIED (using VB.NET)
Posted by Paul Naylor via .NET 247 at 9/7/2004 8:46:13 PM
Accepting the fact that =2ENET 1=2Ex is lacking support for named=
events, and windows security manipulation, we end up using=
interop and the platform SDK, and functions like CreateMutex and=
OpenMutex=2E And it's with OpenMutex that I'm having a problem=2E
In summary: I'm creating a mutex... more >>
Problem calling c# com from c++ client?
Posted by BlackHawk at 9/7/2004 5:34:00 PM
Hi,
I wrote a class library using c#, now I will use it in vc++6.
I have registered my c# program as com and imported the .tlb file in
vc6.
Now I have some problems in using it:
1. How can I response events wroten c# in vc6. The event has custom
parameters. For example:
C# ... more >>
Application won't "unload" when terminated.
Posted by Robin Tucker at 9/7/2004 5:12:56 PM
Hiya,
I have a problem with my application. It hangs around in memory after
exiting (and the debugger thinks its still running; I am unable to "break"
or "stop" execution). The main loop below shows my "main" function. When
the main form is closed, this function is exited, so the "hang" ... more >>
VCC+ and .Net assemblies
Posted by Ron Harter at 9/7/2004 3:54:55 PM
Has anyone used the COM interop to acess .Net asseblies from an unmanaged
C++ application?
For various reasons we have a legacy VS 6.0 C++ application that we would
like to compile with VS .Net and without the /clr switch and using the COM
interop use the XML features available in the .Net Frame... more >>
How to add event handler in VBA?
Posted by Nicola Garone at 9/7/2004 3:47:07 PM
Hi all,
I have a library with some controls developed with VB.Net which I've
used for a while, now I've added an event to signal some data is changed,
but I can't find how to add event handler in the host application (VB6).
I can see regasm has automatically added a method add_<eventname... more >>
unmanged VC++ application accessing .Net framework
Posted by Ron Harter at 9/7/2004 8:20:49 AM
I have a legacy application that is being updated and we would like to
access and use the XML features available in the .Net framework. What is the
best method to use to get at the .Net classes. The application needs to
remain an unmanaged application due to the various 3rd party packages in
use... more >>
Removing Office XP PIA
Posted by Deon Groenewald at 9/7/2004 4:37:02 AM
Hi,
I have been developing an application in C# that make use of Microsft Office
Automation. More specifically it automates Excel 97.
Unfortunately I got a little carried away and installed the Office XP PIA.
Since then code that worked before keeps failing. I know it is not the code
bec... more >>
excel object event handling
Posted by Vladimir Kryachko at 9/7/2004 1:19:06 AM
Hello,
I need to handle an Excel.Workbook.BeforeClose event in my VB.NET
application. When the framework attempts to bind the event with my handler,
it throws a System.InvalidCastException with message "No such interface
supported".
I included the relevant declarations:
Imports Excel
.... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Image Sanning in asp.net
Posted by UmaMaheshwar Reddy via .NET 247 at 9/6/2004 11:04:51 PM
Hi,
i did the scanning application in VB using image scan & edit controls. But the same is not working in ASP. So i'm planning to do it in asp.net. if u have any solution please let me know.
--------------------------------
From: UmaMaheshwar Reddy
-----------------------
Posted by a user... more >>
DLLImport Problem with LPCSTR and BOOL
Posted by Thomas Fisher at 9/6/2004 12:37:17 PM
Hi All,
I am trying to use LaunchRunner in Baf.dll, it's defined like this:
BOOL CDECL LaunchRunner (LPCSTR szUserDisplay, BOOL* pbEnabled);
I'm trying to use it in a vb.net app but can't make it work. Here are some
attempts I've made:
1)
'This one uses a pointer to a boolean ... more >>
Marshal char str[32], DllImport
Posted by forloop at 9/6/2004 9:05:07 AM
The C DLL has the following declaration:
ExternC int4 STDCALL func( char * ); // -> array of 32 byte strings
I can call it from C++ code using [this works!]:
char str[32] = "My String";
int4 result = func( str );
Now, I need to do this in C#. I tried something like this, but it won't... more >>
struct layout of SHITEMID
Posted by style at 9/6/2004 12:41:37 AM
Hi
I'm trying to define the following C++ shell struct in C# (see shtypes.h or
shtypes.idl):
typedef struct _SHITEMID {
USHORT cb;
BYTE abID[1];
} SHITEMID;
where cb is the size of the whole struct (in bytes) including cb itself and
abID can have a variable length.
here is m... more >>
P/Invoke and Managed C++
Posted by Adlene Sifi at 9/5/2004 7:47:04 PM
Hello,
I am trying to call a C function from a dll. These function take a pointer
to a structure as a parameter. This structure is allocated into the unmanged
heap by the C function (it uses some malloc). I would like to know the best
way to release this memory . For the moment I have creat... more >>
get the type of property from com object
Posted by Meir Kalter at 9/5/2004 2:26:15 AM
Is there any way to receive the type of a Property of a
com object, with reflection.
What i know now is how to receive the value.
And what i need is the Type of the property.
However, and i do not know how, the Intellisense know
exectly the types of the members / properties of com
obj... more >>
COM Interoperability with Windows SERVICE
Posted by Kanhaiya at 9/3/2004 11:41:01 PM
Hi,
I have an COM Component ,which is responsible for taking the Data from DB ,
Generating the Excel and sending the Generated Excel File by mail to the user.
Note :The COM is registered on the system. The COM is created in VB.
Now I m trying to access the COM From the Windows service. ... more >>
C# unable to access property "exittime" on terminated process
Posted by brintd NO[at]SPAM comcast.net at 9/3/2004 11:09:28 PM
I have the following code in a c# project of mine.
public void SetProcess(Process NewProcess)
{
CurProcess = NewProcess;
CurProcess.WaitForExit();
MessageBox.Show(CurProcess.ExitTime.ToString());
}
Everything goes well until the last line. The process waits to exit,
then immediat... more >>
Error: System.Runtime.InteropServices.COMException
Posted by Keem at 9/3/2004 6:41:07 PM
Hi,
I have and COM object is running fine on C# Windows Application.
However, it doesn't work on ASP.NET. Below is an error occurs when I call a
method of COM object exactly the same in ASP.NET C#.
"System.Runtime.InteropServices.COMException: Application configuration does
not specify ... more >>
Best Approach
Posted by Mike Carr at 9/3/2004 11:16:19 AM
Instaed of throwing all of my problems one-by-one I decided to put down what
I am trying to do and find out the best approach.
There is a common custom Interface that several apps use (these are written
in C++), we will call this interface ITestExec. There is another
application that Proxy's ... more >>
Can not return a com object from within c#
Posted by Umed Kurdistan via .NET 247 at 9/3/2004 4:37:27 AM
OPC (OLE for Process Control) is a protocol as an interface=
between applications and industry hardware drivers=2E It defines=
two main components (COM) registered in opcserver category :=
OpcServer & OpcGroup=2E
I have written two coresponing classes as follows that implement=
the require... more >>
Asp.net and outlook
Posted by Jon Dixon via .NET 247 at 9/3/2004 1:39:17 AM
Hi, i am having problems accessing outlook from asp.net.
I create a C# console application which connect to outlook fine however when changing it to work with asp.net it just hangs can someone tell me what it wrong with it.
Thanks
Code
try
{
Outlook.Application oApp = ne... more >>
Problem with a COM+ Application
Posted by Alessio Brizi at 9/2/2004 11:52:27 PM
Thanks in advance to those person who'll try to answer me.
I have a problem with a COM dll that I must use for a Web Application
written in ASP.NET and C#. My server is IIS 6 on Windows Server 2003.
I tried to register the DLL with regsvr32, and I added it to the reference
of the project in Visu... more >>
How to use shelllink interface in c#?
Posted by jonathan.ding NO[at]SPAM intel.com at 9/2/2004 9:13:26 PM
I want to get the target and argument of a shell link in a C# project,
so that I need to use the shelllink interface but I do not know how to
do.
I added the shell32.dll into the reference and tried the
ShellLinkObjectClass of Shell32 namespace. But a failure was reported
about that the COM c... more >>
COM Add-in toolbar click events only fire once if window is initialized
Posted by ContactCortes NO[at]SPAM hotmail.com at 9/2/2004 6:51:19 PM
This is a very bizare problem. So, I have a C# COM Add-in for Excel
which creates a toolbar, then pops-up meaningful windows when you
click the toolbar buttons. Everything works fine the first time.
After that, my event handlers do not get called when I click the
toolbar handlers. I've isola... more >>
C#: Problem with libary conversion
Posted by grassi3000 at 9/2/2004 6:36:27 PM
Hello,
I try to write an application, that creates an active directory user
with exchange email adress. To do this, i used the Howto from MSDN
named:Create a Mailbox-Enabled Recipient by Using C# .NET .
In this Howto I'm using CDOEXM.
As for that I have to use the cdoexm.dll in the Exchsr... more >>
Bstr Type of COM DLL witten by C++ has problem.
Posted by À̰·æ at 9/2/2004 12:23:21 PM
Hi
I can't send COM DLL's Bstr Type with c++
My Code is below(C#)
---------------------------------------------------------
//define Unmanaged Type
[MarshalAs(UnmanagedType.BStr)]
public String m_Bstr;
//an ellipsis
//Call
m_Bstr="test";
_Wrapper.VR_CreateTextObj(m_Bstr); <-... more >>
C# and Byte Stream
Posted by Jeff at 9/2/2004 10:43:36 AM
Hello,
I have a socket connection to an unmanged application. Application
messages arrive as a stream of bytes that get added to a byte array.
The structures that define these messages are defined in a C/C++ header
file.
I would like to use managed C++ to expose a Message object to a C#
... more >>
Int* to long?
Posted by Mike Carr at 9/2/2004 10:21:01 AM
Can anyone tell me why my function:
public int pingPhone()
{
return 0;
}
comes across in the tlb as:
HRESULT _stdcall pingPhone([out, retval] long* pRetVal);
I need it to be:
HRESULT _stdcall pingPhone([out, retval] int* pRetVal);
Any ideas?
--
MICHAEL CARR
... more >>
C# and Header Files
Posted by Jeff at 9/2/2004 10:01:03 AM
Hello,
I would like to give a C# application access to constants defined in
C/C++ header files.
These constants are in header files and look like: #define MAX_LEVEL 1000.
These constants are used by many other applications, and I do not want to
redefine them in my C# code.
I think a m... more >>
.NET Interace fails for no interface
Posted by Mike Carr at 9/1/2004 3:57:34 PM
I have a c# component that I have created that has a single interface. =
I would like to be able to use in from a Visual C++ 6.0 program.
C# component
public class TestExec : ITestExec{
public TestExec()
{
}
#region ITestExec Members
public int initializeTestApp(object wra... more >>
GetActiveObject in .NET?
Posted by Robert Wehofer at 9/1/2004 2:34:20 PM
Hello!
I would like to get an active COM server instance using .NET. In Visual
Basic you would use GetObject, in Delphi GetActiveOleObject.
In .NET I have only found the CreateInstance function of Activator. But how
can I GET an instance?
Robert
... more >>
Accessing C# component from COM
Posted by michel poirier via .NET 247 at 9/1/2004 10:40:13 AM
Hi,
I am trying to make a C# component available to ASP through COM.
I have gone through the whole process of creating a public Interface and assembly registration.
Using VBScript in ASP I can write and read the component's properties but I cannot access any methods ?!? I get an error messa... more >>
COM Interop Events bugs
Posted by dont_spam_daniel NO[at]SPAM yahoo.com at 9/1/2004 10:15:46 AM
Timothy O'Hear posted ages ago (March 2002, message
<exNSgYQyBHA.2676@tkmsftngp04>) about a bug whereby VB6 produces the
following error when an event is fired from managed code but not
caught: "Run-time error 80020006 Unknown name error".
I'd like to confirm this. Instantiating a managed obje... more >>
|