all groups > dotnet interop > march 2005
Filter by week: 1 2 3 4 5
Memory gets freed intermittently
Posted by TIL MSCOE at 3/31/2005 10:41:01 PM
I have a function which is something like this –
public unsafe int GenerateKey(out byte[] btKey)
{
//Method Variables
int iSuccess = -1;
btKey = null;
int iSymKeyLen = 0;
string strFileName = @"c:\DebugLog.txt";
FileStream fsLogFile = new
FileStream(strFileName,FileMode.Append,FileAc... more >>
Debugging VB6.0 ActiveX in VS .NET
Posted by EggHead at 3/31/2005 3:36:09 PM
Hi all,
Is there a way to debug the VB 6.0 ctl inside VB 6.0 IDE instead of =
inside VS.Net IDE ?
Each VB 6.0's line of code takes forever to step in inside VS.net :(
Thanks
Egghead... more >>
Problems accessing shared memory
Posted by Terje Henriksen at 3/31/2005 2:54:00 PM
We have a set of .Net programs that uses a shared memory segment. (see 1 for
details)
The problem is that in some cases, a normal domain user is no longer able to
create or access the shared memory segment on a specific computer.
It works on other computers for the same user.
The problem pers... more >>
late binding
Posted by jay widman at 3/31/2005 6:49:20 AM
Can anyone direct me to C# code examples
using late binding?
thanks in advance
jay widman ... more >>
Empty arrays (2)
Posted by Evert Timmer at 3/30/2005 4:24:51 PM
Hi,
I have a question regarding COM interop.
As a reseller, we are developing extension modules for a legacy
application of which we have no source code. This application is written
in VB6 but will be ported to the .NET platform in the near future.
In order for us to make the transition... more >>
Accessing Request.form within C# Class Library on Classic ASP Page
Posted by Mark Heimonen at 3/30/2005 2:29:28 PM
Hi, we have a large application framework written in ASP 3.0. We are
considering the possibility of moving some of our application logic over to
..NET by exposing c# classes through COM Interop. I was wondering if
somebody could walk us through the process of accessing the request.form and
... more >>
Variant containing SAFEARRAY problems
Posted by Andrew S. Giles at 3/30/2005 2:11:03 PM
Helllo all,
I have a COM server that exposes an explicit interface that has a method
that accepts a VARIANT datatype. I want to use this to pass arrays of
integers/doubles/BSTR from my C++ app to a separate C# application.
I can move individual int, double, BSTR without a problem.
But ... more >>
Is there any way to hack around C#'s lack of support for optional arguments?
Posted by Manny Vellon at 3/30/2005 9:36:10 AM
I am trying to implement a COM interface in my app that has a member
function with arguments (IDL form) that look like:
Foo( [in, string] LPCWSTR wPath,
[out, OPTIONAL] VARIANT *pdata,
[out, OPTIONAL] long *plFlags);
I can translate this, successfully, to:
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Word automation in asp.net alternatives?
Posted by Scott Brookhart at 3/30/2005 9:02:42 AM
I have developed an implementation to automate word to be used for spell
checking on a asp.net page. Basically, an instance of Word is used to
capture a TextBox, spell check in Word and then write it back to the
TextBox. I have that working and all is fine. Except, there is some
resistance to in... more >>
Does vb com call .net assembly in windows 2000 server?
Posted by Iter at 3/30/2005 7:07:01 AM
Hi Guys,
I wrote some code that I want vb COM to call .net assembly in Windows 2000
server. In Dotnet side, I have enable the property: Register for COM Interop.
But unfortunately it it failed and give me error that is type mismatch when
called method in .net assembly from vb COM. I don't kno... more >>
how to consolidate a video from jpg's or bmp's with WMEncoder SDK 9
Posted by Olivier Carrier via .NET 247 at 3/29/2005 11:24:59 PM
Hello Ying-Shen,
I have been reading your postings for the past week in several=
websites and you seem to be the only person who might have the=
solution to my problem=2E I am trying to consolidate wmv videos=
from jpg's files (still images captured from an ip cam) using=
WMEncoder 9 SDK... more >>
CallBack in C# from VC++
Posted by Suyambulingam T S M via .NET 247 at 3/29/2005 9:06:03 PM
Hi,
I have a C# Exe and a VC++ ATL com dll.
Now I have added the the VC++ ATL com dll to my C# Exe using Add reference.
I can able to call a function in VC++ dll from my C# code.
I have another function in my C# code which has to be called from VC++ something
like a callback.
Let me expl... more >>
Office 2003 PIA installation
Posted by Peter Wilford at 3/29/2005 10:00:47 AM
Hi All,
I guess I am more than slightly confused and frustrated, for the passed=20
two days I have been trying to install the Office 2003 =91primary interop=
=20
assemblies=92 (pia) to the GAC. If I browse to the %systemroot%\assembly=
=20
directory, they do appear in the GAC, for example t... more >>
problem with scsi_pass_through and Device_io_control urgent
Posted by sai sai via DotNetMonster.com at 3/29/2005 3:53:37 AM
I used scsi_pass_through with Device_io_control.But i am not getting any
output.what is my mistake in my code.Any body Please help me Urgent??
[StructLayout(LayoutKind.Sequential)]
class SCSI_PASS_THROUGH
{
public UInt16 Length;// = (UInt16) Marshal.SizeOf(typeof
(SCSI_PASS_THROUGH... more >>
System.Reflection and Referenced Dlls/Assemblies
Posted by count_black NO[at]SPAM boltgun.co.uk at 3/29/2005 1:37:27 AM
Hi,
I am currently working on a VB.net project where i would like to use a
referenced dll. The problem i face is that i would like to be able to
change the dll without recompiling the project. I have read about
using system.reflection but i am aware that there is quite a
performance overhead,... more >>
Visual C# with Microsoft Word XP
Posted by el_sid at 3/29/2005 12:47:05 AM
I am facing a problem with Visual C# 2003 and MS Word XP. I am using a
customized template for Word and in that template I have defined some
bookmarks. I am trying to create a Word document based on the customized
template, reading all the bookmarks and replacing them with desired values,
re... more >>
Memory leak?
Posted by Steven Kilby at 3/26/2005 12:13:55 AM
Hi,
I'm not sure, but I may have found a memory leak between vb6 and .net. Of
course, it is possible that I just don't understand something correctly or I
did something wrong. In any event, what I've done is create a C# class
library that exposes an interface through COM. If I instantiat... more >>
Getting structs from gdi32
Posted by Peder Y at 3/25/2005 2:32:43 PM
Hi!
[partly a cross-post with win32.gdi, but noone answers questions there]
I'm working on a C# project where we need to get glyph vertices from
fonts. There are several examples on how to do this in C++, but interop
not being my strongest side, I have some questions:
1) Most gdi functi... more >>
Interop COM in C# - can't get the object released
Posted by Alan at 3/25/2005 11:09:03 AM
I am trying to develop an ATL COM object together with a C# web
application that will host it. I am following the COM Interop Part 1: C#
Client Tutorial, Example 2, The C# Code Approach from the April 2004
MSDN library exactly. But the client will not release the COM object.
The COM object is ... more >>
Use C lib file in C#
Posted by Kenneth at 3/25/2005 10:02:04 AM
Hi all,
I got two library files (*.lib) and some header files which is written
by ANSI C from a third party. Inside the header files, there are many
struct, variables and methods declare inside. I am now want to use them in
C#. I have been looking for a solution for a long time. I think th... more >>
Marshal C# -> C DLL: Automatic or explicit?
Posted by TedSharp at 3/24/2005 6:35:02 PM
I have a C struct and a DLL with a single function. I've used the
MarshalAsAttribute, ref, DLllImport, StructLayout, UnmanagedType, etc...
declarations and I'm not having any luck.
I'm not really clear on when you can use the special declarations for
automatic marshalling or when (or how) ... more >>
Managed/Unmanaged : Threading code on which side?
Posted by _R at 3/24/2005 6:36:10 AM
I'm working on a project that entails calling into a legacy C DLL.
The original unmanaged test code (ancient C++) works OK, but
after generating managed C++ shells for calling the DLL via C#,
performance has taken a hit. I can't explain it--Smaller scale
tests run OK, but stressing the code cau... more >>
CreateProcessWithLogonW problem with XP SP2
Posted by jerry at 3/23/2005 7:23:25 PM
I'm trying to run an application under another user within a winform
app writen in C#. I have tried a number of different things, but it
seems that the CreateProcessWithLogonW function should work to do what
I need to do. This appears to work just fine in Windows 2000 and XP
with service pack ... more >>
Future support of ActiveX wrapper of .NET user controls?
Posted by Mike Jansen at 3/23/2005 5:02:53 PM
This seemed to be a popular topic a while back and I haven't seen any recent
posts on it, so I'm going to ask:
It is currently unsupported to create a UserControl in .NET and do the
interop wrappers to make it function _properly_ when used as an ActiveX
control. Is there support for this plan... more >>
Callback method parameters shift
Posted by Bill B at 3/23/2005 3:21:02 PM
I am calling a method from C# to an unmanaged dll that includes two callback
methods, one for reading from a buffer and one for writing to a buffer. The
callback methods have 3 parameters, all IntPtrs. The first callback to each
method works fine, but the second time the read callback is cal... more >>
.Net and DTC
Posted by Ollie Riches at 3/23/2005 12:51:57 PM
Is it possible to access the statistics of a remote DTC via .Net (C#) at
all?
Cheers
Ollie Riches
http://www.phoneanalyser.net
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just ... more >>
Why do cross process QI calls fail
Posted by Bill Rust at 3/23/2005 10:53:08 AM
I'm creating an VB.NET class the implements 2 COM interfaces, call them IFoo
and IBar. If I create an object in my local process, I can call IFoo->QI and
get back the IBar interface, but if the object is hosted in a different
process, the QI fails. Any ideas how I can get this working?... more >>
How I use VC++ dll by C#
Posted by modx at 3/23/2005 10:12:01 AM
Hi All,
I have a library(.dll). It's develop by VC++ 6.0. I would like to know
how C# can used my library? When I add reference at C# project it will show
my dll is not a valid assembly or COM component. How I fix this problem. I
don't want rewrite my dll because it's very big project.
... more >>
ASP and overloaded methods
Posted by Johan Karlsson at 3/23/2005 9:02:25 AM
Hi!
I'm sure this question have been asked before, but I cannot seem to find it
in here.
I've have a classlibrary written in .net that's exposed to com via interop
(registered in the GAC and so on).
Is there anyway to call overloaded functions from a script environment?
Example:
Pub... more >>
function pointer
Posted by shirsoft NO[at]SPAM gmail.com at 3/23/2005 2:06:50 AM
I have a struct in C with a function ptr in a dll called Image.dll:
The functionptr is initialized and called in the C-code
The application completes the above operation and then terminates with
an exception of System.OutOfMemoryException
//------------C-Code---------------//
typedef struct... more >>
Using calling .NET dll from VB6
Posted by Michael--J at 3/22/2005 11:13:02 PM
Hi,
We have a legacy application (which is quite complex and large) written in
VB6. We are currently upgrading it and enhancing its functionalities. We have
also adopted .NET as our new development evironment. As a result of this, the
upgraded version of our application contains code which ... more >>
Finding COM Interfaces
Posted by David Jessee at 3/22/2005 8:59:03 AM
I'm getting a COM Object, but I'm not totally sure which COM Interface(s) it
implements.
How can I find this out?... more >>
How to kill an COM instance in a thread??
Posted by Kevin Yu at 3/22/2005 8:46:34 AM
hi all
running into C# COM interop issue here. we are using a COM+ component to
send email through the *wonderful* lotus notes server. since the COM instant
might crash/hang, so we use a thread to do the sendmail process, when the
COM object hangs or reach timeout. we will killing the thread t... more >>
HOWTO: properly call methods asynchronously???
Posted by Alex Glass at 3/22/2005 7:50:20 AM
I have a component im using in my application. When I call a method
myComponent.slowMethod() my entire application hangs until slowMethod()
completes. I have tried using the .net threading model to trigger the
slowMethod inside a thread wrapper class but I still have the same behavior.
Is ... more >>
tooltips_class32 addtool returns true (no tool added)
Posted by Dave at 3/22/2005 12:42:06 AM
Hello,
I'm attempting to write a tooltip class that uses NativeWindow so I can get the InfoTip effect, but I'm having troubles right off
the bat. I've included alot of the code to help out those who feel they might have some insite.
I do NOT want someone elses project or control. I'm doing... more >>
DllImport works in Visual Studio but not standalone
Posted by jeff NO[at]SPAM thefirst.org at 3/21/2005 8:36:14 PM
This is a little different than the other DllImport problems I've seen.
I'm calling a DLL from C# and it works great when I run inside Visual
Studio .NET.
But when I try to run my application from the same .EXE file that the
project creates, I get
"NullReferenceException: Object reference not s... more >>
Problems registering CCW on Server 2003
Posted by Paul K at 3/21/2005 7:03:06 AM
I developed a COM-visible assembly, created a setup package for it and
deployed the component. The wrapper registers successfully on my dev box (XP
Pro), but will not register on a Server 2003 box that we have here.
I created another COM-visible assembly in the past, and was able to register... more >>
Interop.word problem "The RPC server is unavailable"
Posted by lee at 3/21/2005 5:23:04 AM
Hi.
I'm new to c# .net programming, coming from a java background, and am
currently self learning the language trying to prepare a demo of a
windows.forms application of our current java client.
I've yet to undergo a training course, so im not sure if what i'm doing is
correct or not.
I'll ... more >>
FormatMessage 1812
Posted by Dave at 3/20/2005 6:20:24 PM
Hi, I was wondering if anyone could explain why my c# code is not working as expected.
See the inline comment for my particular problem, which occurs immediately after the call to FormatMessage:
/// <summary>
/// Gets the last error that occured on the calling thread. If the last error is a s... more >>
Byte Arrays from .NET to WIN32 DLLs and back
Posted by Jason Toschlog at 3/20/2005 4:17:05 AM
I need to pass a bitmap in the form of a byte array to an existing win32 dll
from vb.net. At this point, I'm locking the bitmap data [Bitmap.Lockbits()]
and then copying [Marshal.Copy] the data into a byte array on the VB side.
When I make the dll call with the array, the app crashs with no e... more >>
Using .Interop for COM access, my C# client only works on development machine... help?
Posted by Scott Smith at 3/20/2005 12:17:15 AM
Sorry, I'm a bit new to this. I'm writing an app that uses a
Microsoft-supplied .Interop type library (for MS Virtual Server) so that I
can access their COM API from my forms-based application.
Things work fine on my development machine, but if I run them on any other
machine (one without M... more >>
ActiveX control, disposing
Posted by EggHead at 3/18/2005 6:19:16 PM
Hi all,
I am trying to put a Vb6.0 activeX control into a VB.net project. The Vb =
6.0 activeX control works fine in a VB6.0 app.
But the problem comes when I close down the Vb.net app. I get =
the"exception privileged error". I think it is because the ActiveX =
components are not shut dow... more >>
Problem: Calling Indesign from a Windows Service
Posted by Frederik at 3/18/2005 11:52:26 AM
Abstract:
A watched folder is monitored for XML files, once the event Created is
raised, an Indesign.Application should be created
And should process the XML, this works fine using a windows form
application.
Putting this in a Windows Service gives errors.
Description:
Error using a VB.NE... more >>
C# dll called from C++ Application
Posted by coffmans NO[at]SPAM gmail.com at 3/18/2005 6:20:34 AM
I created a dll in .NET using C# and I need to call this dll from a
Visual C++ 6.0 application. I am programmatically calling the
regasm.exe as I am getting the installroot registry key, finding the
folder, get the exe, then doing a CreateProcess and it seems to
function correctly.
My problem... more >>
Windows 2003, Excel and SAP.NET
Posted by Carmen at 3/17/2005 6:47:29 PM
I have an ASP.NET application that exports some data to Excel via Interop.
The application is working fine in Windows 2000 Server. Now we are changing
our servers and we have installed Windows 2003 Server Enterprise Edition,
the application works fine, but it does not export to Excel. I have look... more >>
Reduce the size of Microsoft.mshtml.dll.
Posted by jxl at 3/17/2005 6:05:04 PM
We have a C# application that hosts a WebBrowser control.
The project's output includes the file Microsoft.mshtml.dll
whose size is over 8MB. This DLL is more than 20 times larger than
our actual application. The large size seems to slowdown
our application's startup time significantly. Also it ... more >>
PInvoke marshaling a char* inside a struct
Posted by deleria010 at 3/17/2005 8:01:19 AM
I have a C struct that contains a char* and I am tring to use PInvoke
(and C#) to marshal it as a string but it is not working. I was hoping
someone has done something like this and will give me a hint on how to
get it to work. I also have to add a uchar* that points to the start
of a large uc... more >>
Reference Counting
Posted by Howard Swope at 3/16/2005 4:33:47 PM
I have a managed application that creates an instance of an out or process
com server. After releaseing any references to the server, the server
lockcount will not go to zero. Only after exiting the managed application
will the out of process server lock count go to zero and the process
terminat... more >>
Why does COM+ require a tlb?
Posted by bob c at 3/16/2005 4:27:04 PM
I have a C++ client calling a .NET assembly installed in a COM+ application.
Client and .Net assembly/COM+ package all run on the same machine. Everything
works great...but I have a question about the inner-workings of COM+. Why
does COM+ require the tlb file that was generated when the assemb... more >>
Double-Click a control crashes the .NET IDE
Posted by Fouad N. Jennawi at 3/16/2005 9:31:03 AM
Hi All,
We have a set of COM Controls (OCX and DLL) that were developed in VC6.
We used the .NET Interop to wrap these controls in order to make them
useable on .NET environment and from managed code.
The whole product is mature now, but recenty a problem occured with one of
our custome... more >>
|