all groups > dotnet interop > february 2005
Filter by week: 1 2 3 4
Quick question on the Managed Heap
Posted by Matt Dee at 2/28/2005 4:49:58 PM
As I understand it, each program gets its own address space, divied into
the stack and the heap. I initially assumed that for a .Net application
the entire heap was managed by the garbage collector.
However I keep comming across references to the 'managed heap' and from
what I've been read... more >>
How to register/unregister a .tlb in C#.net
Posted by Andrew at 2/28/2005 12:13:02 PM
Hi, friends,
Besides using tlbinf32.dll, how to register/unregister a .tlb in C#.net? We
used tlbinf32.dll like the follows,
TLI.TLIApplication regLib = new TLI.TLIApplicationClass();
regLib.TypeLibInfoFromFile(tlbfilename).Register(null);
but, it turned out regLib did not release refer... more >>
Methods created with DefinePInvokeMethod don't return results.. or have I done something dumb?
Posted by Peter Aylett at 2/28/2005 1:59:51 AM
Hi,
I'm trying to call methods on a plain DLL using P-Invoke, but I don't
know the DLL or function name until runtime. So I'm using
DefinePInvokeMethod, Reflection.Emit and delegates to call it. The
function executes OK, but the results are never returned.
To demo the problem, the code b... more >>
Inverse P/Invoke an pointer to pointer
Posted by Louis Haußknecht at 2/26/2005 6:23:25 PM
Hi,
this is the first time I'm using "inverse P/Invoke".
I need to build a plugin for a unmanaged application. This application is
needing three functions.
One of the function (#Configure) has to be called like this:
int Configure(HWND iu_parentHandle,char **iop_config, const int ini_s... more >>
Problem using a WinHttpGetProxyForUrl function. Struct use???
Posted by Sunny at 2/25/2005 5:49:09 PM
Hi,
I'm trying to use WinHttpGetProxyForUrl (1). At the end of the post is a
sample program, which reproduces the problem, and a reference to
articles I used to build my test.
Now, the environment: Win2K SP4 (with all last patches), .Net framework
1.1 SP1, VS.Net 2003, C#.
So, I have cr... more >>
Range.Text - Generic Server Exception using Word Interop
Posted by jareddunne NO[at]SPAM gmail.com at 2/25/2005 3:50:57 PM
Hello All-
I wrote a ASP.NET web service for automating Word document creation
based on WordML templates. I have this all working using Word Interop's
Find and Replace funtionality to replace my placeholder text from the
template document with the actual data from my database.
We were hopin... more >>
Simulate OpenDocuments control
Posted by fy_la at 2/25/2005 3:33:01 PM
Hi,
When the user opens a file in the SharePoint document library, we plan to
catch up and handle that "Open" event. Here is a helpful article we found out:
Adding a Document Template, File Type, and Editing Application to a Site
Definitio
http://msdn.microsoft.com/library/default.asp?url... more >>
Structure Marshalling Question
Posted by Thomas Delany at 2/25/2005 3:07:56 PM
Hi,
I am trying to write a C++ wrapper class using MC++ that wraps calls to a
dll that exposes a C API.
I have found several examples of marshalling struct data between managed
and unmanaged code where you have to pass a struct full of data to an
unmanaged code function. I have a slightly ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
passing BSTR* back to managed code
Posted by Andrew Merisanu at 2/25/2005 11:02:41 AM
Hello All,
I have to call a C API function decalred as:
ing GetParameters(int DeviceID, BSTR *ParametersXML)
I tried to do this using the following DLLImport:
<DllImport("avlcontroller.dll", EntryPoint:="GetParameters")> _
Public Shared Function GetParameters(ByVal DeviceId As Integer, By... more >>
VB6 Interop to .NET DLL Failing - Type Mismatch
Posted by MrFile at 2/25/2005 8:37:03 AM
We are attempting to run .NET code from out VB6 SP6 Application.
This is working fine in our Windows XP / 2003 test environment, but is
failing in our Windows 2000 SP4 Environment, and we are at a loss.
Broken Environment:
Windows 2000, SP4
MDAC 2.8
..NET Framework 1.1 sp1
Working Envir... more >>
Windows Media Player from .NET C# windows app problem
Posted by Mark E Mark at 2/25/2005 4:49:02 AM
Hi Everyone,
Wmvdmod.dll (version 9.0.0.2980 fault address 0x0007b8f2) is throwing an
error that is causing my C# application to display a dialog box and then
crash my program. This dll is a windows media player object that I have
brought into my c# app using VS.NET 2003.
Does anyone kno... more >>
Embedded structure (not a pointer) works only when flattenned
Posted by Shell at 2/25/2005 4:03:57 AM
Hi,
I want to marshal a structure that contains an embedded structure. The
C++ definition for the struct is:
typedef struct mpeglayer3waveformat_tag {
WAVEFORMATEX wfx;
WORD wID;
DWORD fdwFlags;
WORD nBlockSize;
WORD nFramesPerBlock;
WORD ... more >>
PivotFieldSet problem
Posted by whiterabbit at 2/25/2005 1:15:03 AM
hi everybody!
i'm looking for a solution to my issue. This one is that i use OWC11 to
connect to my OLAP cube. But when i tried to add a pivotfield, it returns an
error message. this message is:
System.Runtime.InteropServices.COMException(0x80028CA1):Number of arguments
is not valid.
at ... more >>
Using clipboard from .NET MTA
Posted by Tim Mavers at 2/24/2005 5:14:16 PM
Is it possible to use the Windows clipboard from an managed MTA process?
I have a web service that runs in the MTA that needs to copy some HTML to
the clipboard to use in Word.
When I try copying to the clipboard (Clipboard.SetDataObject()), I get a
thread exception (I need to be in the ST... more >>
System.__ComObject
Posted by NOtcarvinSPAM NO[at]SPAM lycos.com at 2/24/2005 1:09:55 PM
>From what I've read, a RCW or type System.__ComObject represents a
generic RCW. What I don't understand is why I'm getting that type
instead of a strongly-typed RCW in my interop code:
Dim comType As Type
comType = Type.GetTypeFromProgID("MyComLibrary.MyComClass")
Dim genericComObject A... more >>
Converting a VB dll to .Net
Posted by Madhuri Mittal at 2/23/2005 11:51:01 AM
I have converted a VB dll to .Net dll. This VB dll had several other VB dlls
as dependencies. When I call the .Net version of the dll and one of its
function, this function calls a function from the dependencies. The
instantiation of the object fails of the dependency dll- is it because I need... more >>
Using Word's clipboard from .NET
Posted by Tim Mavers at 2/23/2005 8:49:13 AM
I am using the Word interop libraries (.NET) shipped with Office 2003. I
have written a C# client that is trying to paste contents to the Word
clipboard, but for some reason, the clipboard is always empty (from Word)
after I paste it.
Is there a different clipboard per thread or process? ... more >>
Interoperability problem
Posted by trialproduct2004 NO[at]SPAM yahoo.com at 2/23/2005 3:58:37 AM
Hi all
I am new to vb.net
I want to call com dll in vb.net
When i add reference of com dll in .net application, new dll starting
with interop is getting created.
Then i tried with using tlbimp.exe to create metadata dll
My question is after generating metadata dll is it necessary to add
refer... more >>
GCHandle.Alloc fails on a complex structure
Posted by Innokentiy Ivanov at 2/23/2005 12:01:53 AM
Hello, All!
I need to create a pinned GCHandle for CRYPT_SIGN_MESSAGE_PARA structure
from CryptoAPI.
When calling
ParaPin = GCHandle.Alloc(Para, GCHandleType.Pinned),
the ArgumentException is raised with comment "Object contains non-primitive
or non-blittable data.". As far as I understa... more >>
Excel Add-in
Posted by Victor Irzak at 2/22/2005 6:34:37 PM
Hello,
I was wondering how to create a drawing in excel which is similar to the
chart.
Say I just want to create a control on a Sheet that I can resize and move
around and there would be something drawn on the control.
Thanks,
Victor
... more >>
How to release COM objects?
Posted by Dick Swager at 2/22/2005 5:12:40 PM
I have a .NET app that uses COM objects. I am getting a lot of asserts from
the COM code that indicates that objects have not been released. I'm
thinking this may be okay because the garbage collector is going to get rid
of these things anyway, but I'm not sure. I'd like to verify that this is... more >>
C Dll pointers arguments
Posted by marfi95 NO[at]SPAM yahoo.com at 2/22/2005 4:02:57 PM
I have to interface with a C Dll (not mine, 3rd party) that I have no
vb.net declares for, so I'm having to create them. I'm having a little
trouble translating some of the types.
The C Dll call:
int LS1 (HWND hwnd, HANDLE hInst, SHORT s1, SHORT *s2);
I am having trouble translating the ... more >>
.NET Component using custom types in Methods - com clients
Posted by Chandru R at 2/22/2005 3:42:39 PM
Hello,
I seem to be having some trouble using custom types in my methods which are
being accessed by com clients. I want to access my .NET component
"InventoryServiceClient" from VB6 / ASP code.
1.The method SayHello() works fine.
2. The Method DoThis(MyTest) fails with an "invalid procedur... more >>
Register for COM Interop -- Development
Posted by moWhite at 2/22/2005 12:37:06 PM
I have a VB.NET Class Library with the "Register with COM Interop" option
checked. As I understand it, this creates a *.tlb file and registers my COM
classes with the registry.
Whenever I recompile the IDE takes care of unregistering and reregistering
my COM classes. This is the automatic... more >>
Unable to Build Assembly With Strong Name if Interop.ShdocVw used
Posted by AmiciDan at 2/22/2005 6:55:07 AM
Following the directions in this KB article, I created a .NET Usercontrol:
How To Use the WebBrowser Control to Open Office Documents with
Visual C# .NET
http://support.microsoft.com/default.aspx/kb/304662/EN-US/
Then, using sn.exe, I created a .snk file and attempt to build the assembly,
... more >>
Forcing traffic to a proxy server
Posted by Russ Ferrill at 2/21/2005 6:52:01 PM
Hello All!
I'd like to be able to force all outbound traffic to a proxy server without
relying on the browser's proxy server configuration. I'm not using Microsoft
ISA server or Microsoft Proxy server, so I can't use their built-in facility
to do this. Is there a way to accomplish this using t... more >>
AxWebBrowser very slow to initialize
Posted by Seventree at 2/21/2005 2:31:12 PM
After adding an AxWebBrowser control to my C# app, the program became
very slow to start from within VS.Net. Stepping through with the
debugger shows that the following line
((System.ComponentModel.ISupportInitialize)(this.webBrowser)).EndInit();
consistently takes 45 seconds to complete (o... more >>
Deploying a Com Interop componnent to be used by VB6
Posted by Ian Ashworth at 2/21/2005 10:47:01 AM
Guys I have a problem with deployment of a com interop component which I
have written in vb.net for use within our main vb6 project.
I have checked the "Register for Com Interop" option within the Project
Properties/Configuration Properties/Build tab.
The target machine has the .net runtim... more >>
Callback function via IntPtr
Posted by kbessette NO[at]SPAM mobilelinksolutions.com at 2/21/2005 7:36:22 AM
hey all
i've got an unmanaged c++ library, and a wrapper class for it. One of
the functions i need to use requires an IntPtr to a function to be used
as a callback function. here's the prototype:
[DllImport("Alksdk_dotNet.dll",EntryPoint="Msg_SetCallback",CallingConvention=CallingConvention.... more >>
Managed Extensions now obsoleted by CLI?
Posted by J at 2/20/2005 1:46:56 PM
I've just been reading a few articles on how Managed Extensions are
now obsolete! Tough thing to hear, as I've been spending every spare
moment studying them to try to solve a problem.
I'd like to get up to speed on this as quickly as possible, and find
out how the new CLI approach relates to... more >>
msi.dll "Memeber not found" for Installer.LastErrorRecord
Posted by nadersoliman NO[at]SPAM gmail.com at 2/20/2005 8:29:46 AM
Hi All,
I used windows installer (msi.dll) COM inside c# using IDE generated
interop. Firstly, I ran into the problem of the hidden CoClass and
found an answer here:
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.interop/browse_frm/thread/a058417808a3be15
And it wor... more >>
Can I reach unmanaged memory from C#?
Posted by Teis Draiby at 2/20/2005 2:07:47 AM
I have a very large memory buffer (500 Mb) that I would like to access from
both C# and unmanaged C++.
- Is it possible to access (read) unmanaged memory from a C# unsafe block,
through a pointer?
Thank you very much, Teis
... more >>
More from MSFLXGRD.ocx
Posted by Rani at 2/19/2005 1:25:01 AM
Greetings:
I have a situation we had developed an application using .net2003 while VB
6.0 were installed we had used the old flex grid in developing the .net
application now we are using a terminal without vb6.0 installed so we are
unable to use the grid because we didn't install vb6.0 ....... more >>
Change encoding from UTF-8 to ISO-8859-1
Posted by JuanDG at 2/18/2005 8:35:02 AM
Hi,
I have a .Net Web Service and the encoding of the SOAP Messages is always
UTF-8, and I need to change the web service so that it encodes with
ISO-8859-1 because it’s the only encoding my web services client supports.
I've updated my web.config & machine.config Globalization requestEn... more >>
Reading Text datatype into a byte Array
Posted by debu NO[at]SPAM rheal.com at 2/18/2005 3:07:31 AM
Hi,
I am populating a records fetched from a select query in
OleDbDataReader. The datbase is MS Access, The datatype of the select
query column is Text. I want to read the data as Byte array instead of
string as Reading it into a string causes it to be converted to
Unicode which is do not wan... more >>
Could not open macro storage while opening a word document from we
Posted by Sivaraman.S at 2/18/2005 1:47:02 AM
Issue:
When I am opening a word document or a template from an ASP.NET Web
page (language used VB.NET Visual Studio Version 2003) using
Word.ApplicationClass object (Reference Word 11.0 object Library), I am
getting the following error:
could not open macro storage (System.Runtime.... more >>
Convert Managed String* to TCHAR* or LPCOLESTR
Posted by Teis Draiby at 2/18/2005 12:05:02 AM
I have an unmanaged AVI movie loader that is wrapped in a managed class in
order to use it from C#, the IJW way. Everythimg works fine.
Problem:
Now, I want to move the FileOpen Dialog to C#. Thus, I need to convert the
file path from a managed "String *" to a "TCHAR *" or a "LPCOLESTR".
How ... more >>
How to make external process launch "ontop" of my TopMost forms?
Posted by Robin Tucker at 2/17/2005 9:07:19 PM
Hi,
I am using System.Diagnostics.Process to launch (shell extension) a process.
I have forms in my application that are specified as "top-most" but I would
like my launched application to be top-most of those forms when it arrives.
At present, it isn't. I have the same trouble with Micros... more >>
newbie... Trying to use .NET class library from VB6/COM
Posted by jqpdev at 2/17/2005 3:07:02 PM
I'm trying to get a proof of concepting working before proposing a solution
to my supervisor. My little experiment is to get a VB6 form to load a .Net
class library and interact with it. The .net class library must contain a
..net windows form.
I'm using VB.NET (2003), VB6, and 2 Virtual ... more >>
Excel 2003 - Excel XP
Posted by Baranyi Peter at 2/17/2005 1:33:37 PM
Hi,
I develop an application, what would create an Excel table. On the machine
where I develop, I have Office2003 installed, but the client has only
OfficeXP. How can I refer to the OfficeXP PIA, if I don't have the older
dll's? What I can refer to is only the v11 DLL, what will not work at... more >>
Calling an unmanaged dll
Posted by rward01 NO[at]SPAM hotmail.com at 2/17/2005 7:28:50 AM
I am trying to call a dll with an exported function with the following
signature.
int MessageToCAM(UINT nAction, BYTE** sMessage, UINT* pnSendLen, BYTE**
rMessage, UINT* pnRecvLen);
I have tried to the following function declaration.
Private Declare Ansi Function MessageToCAM Lib "remote.... more >>
RegAsm issue
Posted by savoy at 2/15/2005 2:25:01 PM
I'm attempting to access a dll written in VB .Net 2003 from VB6. The .Net
class is shown below:
Public Class Application
Public Function GetName() As String
GetName = "My name is John Doe"
End Function
Public Sub Application()
End Sub
End Class
I compile... more >>
C#-DLL usable by VBA without framework?
Posted by see NO[at]SPAM signature.com at 2/15/2005 1:41:09 PM
Hi there,
Is there a way to create a DLL, written in C#, that can be referenced/used by VBA without the
necessity of installing the Framework on all the "Excel-PCs"?
TIA, Martin@Vienna@Austria@Europe
-------------------------------------------------------------------------
to get my r... more >>
How do I pass an array from C# to C++
Posted by paul88 at 2/15/2005 6:59:02 AM
I am trying to pass an array from a C# app to a C++ DLL. The interface on the
DLL is defined as
PassData([in]int ElementCount,
[in, size_is(ElementCount)]double* dataSet1,
[in, size_is(ElementCount)]double* dataSet2);
I have read the MSDN help about the "Default Marshaling for Arrays"... more >>
tlbimp: Strong Name DTS Interop COM Component
Posted by Gaurav at 2/14/2005 2:15:03 PM
Hi ,
I have a .net assembly that references interop (COM Compoonent) for calling
DTS on SQL Server. I added "Microsoft DTS Package Object library
(dtspkg.dll)" by using Add Reference in Visual Studio.Net (COM TAB)..
I need to have strong name for my .Net component which gives an error since... more >>
Excel 2003 Range problem
Posted by Simon Neumann at 2/14/2005 1:46:06 PM
Hi,
I've written a function to get values from an Excel sheet to VB.Net:
....
Dim sheet As Excel.Worksheet = xlWorkbook.Worksheets("Liste")
Dim folder As String = sheet.Range("M2").Value
This worked great in Excel XP, but in Excel 2003 I'll get an error: "object
reference not set to an in... more >>
tlbimp: interop dts COM Component needs strong name
Posted by Gaurav at 2/14/2005 1:41:08 PM
Hi ,
I have a .net assembly that references interop (COM Compoonent) for calling
DTS on SQL Server. I added "Microsoft DTS Package Object library
(dtspkg.dll)" by using Add Reference in Visual Studio.Net (COM TAB)..
I need to have strong name for my .Net component which gives an error since... more >>
Mixed DLL Loading Problem, C# client
Posted by Fritz at 2/14/2005 5:33:01 AM
I'm building Mixed DLL (C++ managed + unmanaged code) as a wrapper for a
native DLL, to make it available to .NET-assemblies.
After experiencing problems with "LNK2020 unresolved token ..." I finally
got aware of the "Mixed DLL loading problem" described in
- (1) http://support.microsoft.com... more >>
Specifying thread outgoing security
Posted by Manfred Braun at 2/13/2005 11:26:12 PM
Hi All,
I have a threaded application/tool, where I have to access files on remote
computers by different threads and I have to autheticate. In a commandline
tool I would use "net use x: \\foreigncomputer\admin$ /user:domainA\userB
password" to establish a secure channel and then modify the fi... more >>
Unable to Load DLL
Posted by Jeremy at 2/13/2005 8:42:26 PM
Hi
[DllImport(Win32DLL, EntryPoint = 'LoadReports', CharSet =
CharSet.Ansi, CallingConvention = CallingConvention.StdCall)]
This works on my test Windows 2003 machine however now that I deployed
my web
application on another Windows 2003 Server it no longer works.
Error : Unable to Load ... more >>
|