all groups > dotnet interop > july 2006
Filter by week: 1 2 3 4 5
Since Visual Studio 2005 error loading type library
Posted by mj at 7/31/2006 10:30:01 AM
Hello,
After I installed Visual Studio 2005 I noticed that when I try to add a
reference to a type library (tlb) I get the message "Could not load the type
library, Error loading the type library. After much research I uninstalled
VS2005 and went back VS2003 but with still the same problem. ... more >>
DDE in C#
Posted by Anoop.BTC NO[at]SPAM gmail.com at 7/30/2006 11:53:42 PM
Gents,
Is it possible to do Dyanamic Data Exchange using C# in .NET.
Please discuss.
Regards,
Anoop
... more >>
export an image file from excel using using office interop
Posted by Kâsým GÜLCAN at 7/29/2006 2:42:08 PM
Hi there,
Is it possible to export an image file (.jpg/.gif) from excel using office
interop ?
If so, how do you do this? Are there any code examples available?
Thanks.
... more >>
pinvoke - C++ struct array to C#
Posted by Jason Newell at 7/28/2006 11:34:23 AM
All,
I'm authoring a C++ .dll & C# .dll and need a little help. I am
experienced in interop but this one has me stumped. Does anyone have a
simple example of how to declare a C++ exported function that can return
a struct array in one of the parameters to C#? The C# .dll would have
no ... more >>
Marshaling for setupapi.dll
Posted by bullshark NO[at]SPAM gmail.com at 7/27/2006 12:23:13 PM
We have:
[StructLayout(LayoutKind.Sequential, CharSet= CharSet.Ansi)]
public unsafe struct SP_DEVICE_INTERFACE_DETAIL_DATA {
public int cbSize;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=84)]
public char[] DevicePath;
}
The setupapi.dll method SetupDiGetDeviceInterfaceDetail r... more >>
Problem calling DeviceIoControl
Posted by eduwushu at 7/27/2006 11:58:02 AM
Hi Im trying tu use deviceiocontrol to retrieve serial port informationin a
C#project.
The problem is that i cant make it work. it gives me always the same error.
The function returns a win32 error telling me that the parameter is not valid
The problem is that i dont know which parameter is th... more >>
class library
Posted by Vlad at 7/27/2006 2:20:15 AM
Hi!
I have no experience in COM interop so I really need some help.
I have to reuse some vb.net code in VBA.
I made a new class library project where I added a new com class with
some public members and methods. After resolving some conflicts, like
some Warnings about generic types, I was a... more >>
About Microsoft Access Data Import
Posted by keremskusmezer NO[at]SPAM gmail.com at 7/27/2006 12:27:28 AM
I am using Microsoft Text Driver with a schema.ini file , is there a
way that i can handle UTF-8 Encoded text files, cause the orginal
documentation states that it characterset option only supports OEM And
ANSI
Regards
Kerem Kusmezer
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
IRunningObjectTable.Register
Posted by lgs.lgs at 7/26/2006 5:19:03 PM
Could someone take a look at the docs for this method?
http://windowssdk.msdn.microsoft.com/en-us/library/system.runtime.interopservices.comtypes.irunningobjecttable.register.aspx
In particular, I'm interested in the return value. The docs say it is an
HRESULT. However, I sincerely doubt th... more >>
C# and activex
Posted by Valentino Ricci at 7/26/2006 5:12:02 AM
I've an ActiveX made using MFC that has a method that shows a modeless dialog
box containing a Tree control (SysTreeView32).
This ActiveX is used inside a C++ MFC application and it works fine.
When I use this ActiveX inside a C# application the bitmaps associated to
each item belonging to the... more >>
How to activate one of two sheets opened in Excel via C#
Posted by Siv at 7/25/2006 10:39:15 PM
Hi,
I am getting a problem, I have a Windows app in C# opening Excel and getting
2 workbooks open. During processing I want to switch between the two
workbooks to sometimes write to one sheet in workbook 1 and then at another
time to one sheet in workbook 2.
When I try to activate one or t... more >>
DLL import Types
Posted by pigeonrandle at 7/25/2006 4:57:16 AM
Hi,
Is there a list detailing equivalent types in c# for imported dll
functions?
ie HWND = IntPtr
DWORD = Int32
etc.
I have been looking at pinvoke.net and there is no consistency between
the various types in the declarations (some define HWND as int, some as
IntPtr) - all very con... more >>
Tlbimp reference problem
Posted by netquirer NO[at]SPAM gmail.com at 7/24/2006 2:20:19 PM
Hi,
I am using tlbimp like this:
tlbimp module1.dll /OUT:module1.tlb.dll /NAMESPACE:MyModule1
tlbimp module2.dll /OUT:module2.tlb.dll /REF:module1.tlb.dll
Normally this works fine for me, but on a particular machine I get this
error:
TlbImp : warning TI0000 : Error while importing type... more >>
How to marshall a vector<string>
Posted by SONET at 7/24/2006 11:20:02 AM
I'm a newbie to marshalling, what's the best way to call the following C++
function
from C#?
void foo(const vector<string> name) ?
I've tried doing a
[DllImport("test.dll"), CharSet = CharSet.Ansi)]
public static extern void foo(ArrayList name);
but that didn't work. ... more >>
C++ Interop: Win32-Lib (no COM): How to wrap a class hierarchy?
Posted by Ralf at 7/24/2006 7:39:08 AM
First: I'm no c++ geek, I'm just a newbie in c++ and mostly I work in
c#.
But now I should work on a wrapper for a c++-library to .net. I've read
many articles about C++ interop but no one is talking about wrapping a
complete class hierarchy in a native lib. It's only about one class or
so (lik... more >>
Detecting Device Change
Posted by Jeff Gaines at 7/23/2006 4:15:37 AM
I want to be able to detect a CD change (along with other removable
devices if possible). I have trapped WM_DEVICECHANGE in WndProc but after
testing it seems only to work if CD AutoPlay is enabled.
Is there a way to trap a device change - native .NET if possible -
without AutoPlay enabl... more >>
windows service and unmanaged dll
Posted by simon at 7/21/2006 9:28:54 AM
hi,
Maybe, because of extremally hot sommer my searching skills are reduced
to zero, but i couldnt find any detailed description of windows
services, i would be greatful if You could give me some link... well
i'll describe my problem anyway:
I have to write windows service, which on timer e... more >>
Need help with Paste method in Microsoft.Office.Interop.Graph
Posted by TerryC at 7/20/2006 9:30:01 AM
I'm developing a C# application that creates a scatter/line chart in a
PowerPoint presentation. I need to populate the chart's datasheet with
12,000 data points. I can do it one cell at a time, but this approach is far
to slow.
As far as I can tell, the only other options are to use the P... more >>
Usercontrol as ActiveX - trouble with events
Posted by Aled Hughes at 7/20/2006 8:25:02 AM
Hi,
I'm having trouble with a UserControl (written in C# with framework v2.0)
that I've made into an ActiveX control. It seems to be OK except for event
handling.
As a test I use VB6 as the container (I've also tried from C++6 too).
If I create the control in VB6 code as follows:
Dim Wit... more >>
Pass BYTE array from COM DLL to C#
Posted by krumbach NO[at]SPAM gmail.com at 7/20/2006 7:49:28 AM
I have the following atl com object method:
CGraph::Test(LONG* size, BYTE** pByteBuf)
{
*size = 5;
*pByteBuf = (BYTE*)CoTaskMemAlloc((*size));
for(int i=0; i< *size; i++)
{
pByteBuf[0][i] = i;
}
return S_OK;
}
I have edited the il for this method:
... more >>
Excel wont launch from C# (interop)
Posted by MCC at 7/19/2006 5:24:01 PM
I've added a reference to Microsoft.Office.Excel.dll and used the code from
http://support.microsoft.com/kb/302096/
.... C# debugger steps through the code, but Excel never launches.
???
... more >>
ToString() == "System.__ComObject"
Posted by ME at 7/19/2006 3:31:17 PM
I have some code that performs a comparison and returns an object that
implements IHTMLElement:
example call: FindElement(HTMLDoc, "msthml.HTMLButtonElementClass");
example method:
public mshtml.IHTMLElement FindElement(mshtml.HTMLDocument document, string
criteria)
{
foreach (mshtml.... more >>
Building a complete ERP Solution using Windows Controls in IE
Posted by ASPKhaleej at 7/19/2006 1:40:22 AM
Hi
We are trying to develop an erp solution either using pure ASP.NET or
by hosting windows forms in Internet Explorer.Which is the best way to
do this ?
Are there any samples for complete windows forms solution hosted in
Internet Explorer.
How does it effect the performance if hosted as w... more >>
Impersonation and Word
Posted by Russell Thomas at 7/18/2006 1:40:04 PM
If I’m impersonating a network user in my windows application and I open or
save a word document using the com interop from within my application am I
still impersonating the user in word? ... more >>
DLL C++ export to .NET C#
Posted by onramp123 NO[at]SPAM yahoo.com at 7/18/2006 8:50:03 AM
apologies in advance if this topic has already been covered, but my
search in the newsgroups has yet to reveal the secret formula.
I've got a .NET C# application that invokes a classic C++ .DLL using
DllImport. I'm working at source level with both .NET and the C++
DLL. The DLL exports no... more >>
How do you Define a named range in excel using C#
Posted by Tim at 7/18/2006 7:47:50 AM
I am trying to define a named range in excel through automation.
This is the VBA code from a macro that does what I want. I'm trying to
define the name range so I can use a ADO connection later to insert
data.
Range("A1:E1").Select
ActiveWorkbook.Names.Add Name:="MyTable",
RefersT... more >>
How to insert a word file in another word file as an attachment ?
Posted by catherine.trojanowski NO[at]SPAM gmail.com at 7/17/2006 8:35:23 AM
Hi ,
I'm trying to insert a word file F1 into a word file F2 using the
following instruction :
Object trueValue = true;
Object falseValue = false;
Object oEndOfDoc = "\\endofdoc";
Microsoft.Office.Interop.Word.Document nvDoc;
nvDoc.Bookmarks.get_Item(ref
oEndOfDoc).Range.InsertFile((st... more >>
vb6 com classes throwing exceptions when called from vb.net app?
Posted by amperie NO[at]SPAM yahoo.com at 7/15/2006 9:49:11 AM
Hello,
I have several vb 6 COM classes that I am trying to call from a vb.net
app. The vb 6 classes have the vb 6 error handling (on error resume
next, etc) and handle any errors that come up fine. The problem is that
when I Call them from the vb.net app these errors that happen inside
them, wh... more >>
c# dotnet crystal report 2005
Posted by arun at 7/14/2006 9:57:46 PM
how to sql parameter passing in c# dotnet 2005 crystal report please give the code... more >>
EXE and VBE difference
Posted by vul at 7/14/2006 11:52:16 AM
I'm trying to use DLL created in VB 2005 in VB6 project.
I did everything to make it work with late binding. It works when I run
compiled EXE and produces an error 'The system cannot find the file
specified' on the first line of this code:
Dim objXML As Object
Set objXML = CreateObject(... more >>
Passing COM object from managed to unmaged code in .Net
Posted by C# Dev at 7/14/2006 1:28:02 AM
Greetings,
Is it possible to pass a COM object from unmanaged C++ to C# (and possibly
back?)
Say create the object in C++, pass it to - and then invoke it in - managed
..Net?
Is yes, what is required in terms of
- C++ and C# interface declaration
- memory management
For this to suc... more >>
WritePrinter
Posted by MPF at 7/13/2006 4:38:42 PM
Thanks in advance for any assistance. Re-post from C# forum.
I've implemented the code found in the KB article below, but nothing is
actually printing. I see the document being sent to the printer, but nothing
gets printed.
I've tried printing to a network printer, as well as the local "Mi... more >>
TLB using problem
Posted by vul at 7/13/2006 9:42:54 AM
I created very simple Class Library in VB 2005 (let's call it COMInterop). I
set Register For COM Interop property to true to make it accessible by VB6
program.
After I compiled it, I got COMInterop.dll and COMInterop.tlb files, I have
no problem with using both of them on the machine where the... more >>
.net function returning string array to VB6
Posted by mike.aes NO[at]SPAM gmail.com at 7/13/2006 1:16:07 AM
I've got a .net function within a comclass project that needs to return
an array of strings to a VB6 app. I declare the .net function as Array
but what comes back to the VB6 is a text string that says
"System.String[]". Any ideas how I can resolve that?
... more >>
P/Invoke on C DLL which takes char * parameter ?
Posted by FX at 7/12/2006 8:14:44 PM
Hi all,
I'm programming a C# application which invokes a DLL (written in standard
C).
I have tried many things but any success since the beginning of the weeks.
Here is the C prototype:
unsigned short GetField ( unsigned short fieldId, char* fieldValue, size_t*
FieldSize);
This method... more >>
Can RCW and CCW be used together?
Posted by TW at 7/11/2006 5:28:13 PM
We're C# .NET developers who must use an ActiveX container (not IE) to
create and contain our components. We'd like both the component and the
client to be C# .NET code.
But, it appears that you cannot do this. To do this, the RCW of my
client code would have to be able to talk to the CCW of m... more >>
How to expose generic classes to COM?
Posted by Patricio at 7/11/2006 10:56:34 AM
Hello,
We have a set of C# classes with their interfaces exposed to COM:
MatrixUInt16 : IMatrixUInt16
MatrixUInt32 : IMatrixUInt32
MatrixInt16 : IMatrixInt16
MatrixInt32 : IMatrixInt32
We are moving to VS2005 and these C# classes are excellent candidates for a
generic i... more >>
.NET assembly - access as COM object and native .NET assembly
Posted by kaczmar2 NO[at]SPAM hotmail.com at 7/10/2006 6:49:46 AM
Hey there,
I have a C# .NET class that contains some functionality that is used in
a hybrid Classic ASP /ASP.NET site (we are doing a conversion to .NET).
Part of my class functionality (written in c#) needs to be accessable
to VB6 COM objects and Classic ASP pages, but some only needs to be... more >>
Dsofile with UNC path - ASP.NET
Posted by thomas.denolle NO[at]SPAM gmail.com at 7/10/2006 1:53:15 AM
I have an exception when i try to open a file (which is located on a
shared directory) with dsofile :
oDSO = New DSOFile.OleDocumentPropertiesClass
oDSO.Open("\\developpement\Doc1.doc", False,
DSOFile.dsoFileOpenOptions.dsoOptionDefault)
-> Exception from HRESULT : 0x800300FC (STG_E_INVAL... more >>
Marshal COM Variant out from C++ to C#
Posted by C# Dev at 7/9/2006 2:48:01 PM
Hello
I have a C++ API method in a COM object:
HRESULT GetReason([out] VARIANT* pReason);
pReason is a variable created by the C++ and is preferrably (but not always)
a BStr.
In C# I cannot use UnmanagedType.AsAny since compiler won't allow it in an
[out] parameter.
A part of the pr... more >>
Using /clr in MFC ATL apps
Posted by Juan Dent at 7/8/2006 6:07:01 PM
Hi,
I have a large MFC ATL EXE built with C++ 8, and now I am compiling with
/clr to enable C++ interop - i.e. accesing .NET components directly in the
same executable as the unmanaged code from MFC/ATL.
When I compile I get a series of warnings and would like to know if they are
of conc... more >>
How Can I access SQL Server SMO Objects in VB6
Posted by ANeelima at 7/7/2006 9:14:02 AM
I tried to make COM callable wrapper (CCW) for SMO using the following
command line execution using RegASM.exe
After executing the command line RegAsm.exe, I got the following output.
------------------------------------------------------------------------------------------------------
Micros... more >>
Microsoft Office.Interop Excel Error
Posted by gavin at 7/6/2006 10:23:01 PM
Have a VB .Net VS2005 application works fine on development system.
The app uses Excel.
When I copy app to new computer that has Office loaded get error:
Unhandled exception has occurred...
Could not load 'Micrososft Office.Interop.Exccel', version=11.0.0.0...
The system file cannot find the ... more >>
P/Invoke on char* return values
Posted by Peter Franks at 7/6/2006 3:00:06 PM
I'm attempting to call a unmanaged function that returns a char *,
something like:
mylibrary.c:
static char err[256];
char * last_error()
{
return err;
}
c#:
[DllImport("mylibrary.dll", CharSet=CharSet.Ansi)]
public static extern String last_error();
---
(Assume tha... more >>
Calling Singleton COM Local-Server from Managed Windows Service
Posted by fadishawish NO[at]SPAM gmail.com at 7/6/2006 10:00:04 AM
I have a interesting problem and thought this would the right forum for
it.
Background:
We have created a series of new generation middleware components using
..NET/C#. These components are managed DLLs hosted in a WIndows
Services and .NET Remoting is used for alll client comm. to these
co... more >>
mshtml HTMLFormElement events
Posted by brandon.hurlburt NO[at]SPAM bc3tech.net at 7/6/2006 9:57:31 AM
There was an old thread with this same subject:
http://groups.google.com/group/microsoft.public.dotnet.framework.interop/browse_thread/thread/a6f451e1677943c3/06fafc27f869273e?q=mshtml+htmlformelement+events&rnum=1#06fafc27f869273e
Which addressed mshtml's inability to bind to a form's OnSubmit ... more >>
IDataObject GetData - "The parameter is incorrect"
Posted by Daniel Halan at 7/5/2006 8:26:15 PM
Hello,
Im trying to fetch a Drop-event, and everything goes fine until I call the
"GetData" method.
Ive tried both to catch the drop with defining FormatEtc to a CF_HDROP and
iterating Formats with "EnumFormatEtc" both returns same error...
Im guessing it doesnt like the input of Format... more >>
P/invoke: passing a struct parm with enum field from c++ to c#
Posted by cmurialdo NO[at]SPAM gmail.com at 7/5/2006 8:16:47 PM
I have a problem passing a struct with an enum field.
I have this c++ code:
typedef struct st_mysql_bind
{
....
my_bool *error;
enum enum_field_types buffer_type;
....
}MYSQL_BIND;
enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
MYSQL_TYPE_SHORT, MYSQL_TY... more >>
WebBrowser Control AttachEventHandler Problem
Posted by Calphool at 7/4/2006 8:42:02 AM
I am attempting to attach "onblur" events to all elements in a loaded HTML
document within the WebBrowser control. I can successfully attach the event,
but I cannot tell which control is firing the onblur. I need some way to get
the sender to send itself. Here's my current code:
..
..
... more >>
HOW TO READ ARRAY OF STRUCTURES FROM COM using C#
Posted by srinivas at 7/3/2006 4:28:21 AM
Hi ,
Pls help me to solve this problem .
/* --this is one of the function in COM component */
int ProjectLIsts(LPCTSTR prj , VARIANT* prj_list)
{
prj_Lists= { ARRY OF STRUCTERES . ,.ONE STRUCTERES FOR EACH PROJECT
}
returns TOTAL NUM of PROJECTS
}
...........
I want to... more >>
|