all groups > dotnet interop > october 2005 > threads for october 1 - 7, 2005
Filter by week: 1 2 3 4 5
COM-Interface usage in MultiThreaded-Environment fails
Posted by taj at 10/7/2005 10:15:12 PM
Hi,
i got really frustated by this; in the following code, i try to use
SHGetDesktopFolder-function to retrieve the IShellFolder-interface for -
well - the desktop (root) folder.
works well for the first (main) thread doing so; however, it does not
for the second also doing this if the int... more >>
Repost: Marshal array of Enums from VB6 to .NET
Posted by Joe at 10/7/2005 1:03:02 PM
Reposting in the hope that an MVP or someone from Microsoft can answer this.
I have an enum defined in managed code, e.g.:
public enum MyEnum
{
MyValue1,
MyValue2,
MyValue3
}
I have exposed a method which takes an array of MyEnum as an argument, e.g.:
public void MyMethod([In] ref MyEnum[... more >>
Structured Storage API \ File Properties (PIDSI_THUMBNAIL)
Posted by Jason Newell at 10/7/2005 11:19:45 AM
All,
I've ported the Microsoft Structured Storage API to C# and it works
great. My main purpose was to access a compound file's file properties,
which I've done.
I would now like to extract out the embedded thumbnail image via
PIDSI_THUMBNAIL and I need a little help. I've got the STAT... more >>
Problem with VB6 calling a C# Class
Posted by Casey at 10/7/2005 11:01:05 AM
I am trying to access a .NET class written in c# from a VB6 application. I
exported the Typelib and registered it successfully (RegAsm DotNetClass.dll
/tlb), but my VB program only sees the methods inherited from Object (Equals,
..GetHashCode, GetType and ToString). I would appreciate any gu... more >>
COM and Interop
Posted by Hendrik Jan at 10/7/2005 3:37:07 AM
Hi,
When I create an dll in vb.net and I register the dll for COM Interop, is it
then possible to use that dll on a machine where de CLR is NOT installed?
Thanks,
Hendrik Jan... more >>
powerpnt.exe remains running after OLE Quit()
Posted by Andy Fish at 10/7/2005 12:00:00 AM
Hi,
I have office 2003 powerpoint with SP1 and I find that running the following
code causes powerpoint to remain in memory
Dim app As PowerPoint.Application
Dim pres As PowerPoint.Presentation
Set app = New PowerPoint.Application
Set pres = app.Presentations.Open("c:\small.ppt", msoTrue,... more >>
RegAsm warning: No types were registered
Posted by Achim Domma (SyynX Solutions GmbH) at 10/6/2005 10:53:59 PM
Hi,
I have the following class which I want to expose as COM object, but
regasm tells me, that no types were registered.
namespace SyynX
{
[Guid("4ADD0E9C-E7CE-42fd-A920-D3C4E6AF29E8")]
public interface ISVG
{
void Load(string xml);
void Save(string pat... more >>
VBA object browser doesnt list C# class methods.
Posted by manohar.shankar NO[at]SPAM gmail.com at 10/6/2005 7:27:18 PM
Hi,
I have already posted a related question on this group, may be the
answer to this question is linked to the answer to other question, but
I think its not related. I have added the link to other question at the
end of this post.
Coming to the issue I am facing:
I am using Visual Studio.... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
methods from super interface not availabe through ComVisible interface
Posted by manohar.shankar NO[at]SPAM gmail.com at 10/6/2005 6:01:53 PM
Hi,
I have a pretty basic issue when I am trying expose a C# interface for
COM interoperability. Here is the interface definition:
[ComVisible(true)]
public interface IClass:IClassBase
{
int IClassMethod();
}
and the super interface looks like:
public interface IClas... more >>
passing C# array to and from C array
Posted by johnmann56 at 10/6/2005 4:51:25 PM
I have what I imagine is a simple question, but don't know how to approach it
really. I have a dll compiled from ANSI C, which has a function declaration
with an array;
void myFunc(int data[], ...);
How can I send in a C# array to "data[]" and get it back out? Thanks.... more >>
problems calling vb6 queued component in vb.net
Posted by Jeff Bishop at 10/6/2005 8:57:41 AM
Hello Everyone,
I am having problems getting a component that was written in VB6 to work
inside of vb.net. It is a queued component. Can someone send me some
sample code that would work in this instance? Here are some questions:
1. Should GetObject still work inside of vb.net? If so, ... more >>
IIS Crashing with Server Application Unavailable
Posted by asp.netprogrammer at 10/6/2005 7:09:45 AM
We are running a ASP.NET application which uses a COM DLL to go to active
directory and a couple of dataabases. There is no UI to the ASP.NET
application it just returns an XML back with the results. This ASP.NET
appplication is called by another ASp.NET application.
PROBLEM: About 4 to 5 t... more >>
Commenting a class and its methods
Posted by groups NO[at]SPAM artgs.com at 10/6/2005 6:30:35 AM
In C#, how do you correctly comment a class that is exposed to COM via
the interop so that the comments appear in a COM development tool (i.e.
Visual Basic's object browser)?
... more >>
MarshalAs-Attribute for a Variant-Safearray?
Posted by Sebastian W at 10/6/2005 1:54:23 AM
Hello
Can anybody tell me how I use the MarshalAs-Attribute to mark a
parameter as a VARIANT which contains a SAFEARRAY?
Or can I rebuild a structure VARIANT which I can use to transport a
SAFEARRAY?
Thanks in advance
Sebastian
... more >>
Problem with Unions
Posted by BxB at 10/6/2005 12:00:00 AM
Hello I need help to interop this structure in C# to make an wrapper for the
"InstallApplication" method:
typedef union _INSTALLSPEC {
struct {
WCHAR* Name;
GUID GPOId;
} AppName;
WCHAR* FileExt;
WCHAR* Reserved1;
struct {
GUID Reserved1;
DWORD Reserved2;
} ... more >>
ASP.NET [DllImport(...)] and managed DLL location
Posted by Egbert Nierop (MVP for IIS) at 10/6/2005 12:00:00 AM
Quick Question.
In ASP 1.1, if you put a managed DLL (named test.dll) in the bin\ directory,
it was sufficient to use
[DllImport("test.dll"] etc...
What's the location for ASP.NET? Since I get a module not found exception!
Thanks
... more >>
returning VARIANT containing SAFEARRAY of bytes
Posted by Bimish at 10/5/2005 9:39:58 AM
I am working on a ATL COM project which will be used by both COM-based
clients and .NET clients. One of the interface methods in the ATL project
returns a VARIANT. Depending on the input to the method, the VARIANT may
contain a VT_BSTR, VT_I4, etc. It also may return an array of bytes (
V... more >>
TVITEM.state is set incorrectly for treenodes.
Posted by Jaiprakash at 10/5/2005 9:19:54 AM
Hi All,
I am trying to get a treenode's state image by sending TVM_GETITEM messgae
to the treeview.
I have set ...
TVITEM.mask = TVIF_STATE
TVITEM.stateMask = TVIS_STATEIMAGEMASK
TVITEM.hItem = <item whose state image i want ot know>
all other members of TVITEM are set to zero.
I am using... more >>
Calling COM method returning SAFEARRAY(BYTE)
Posted by Graham Morris at 10/5/2005 12:00:00 AM
Googling hasn't solved this little problem, so here goes:
I have a function in C++ which returns a safearray of bytes. I cannot
change this function, and I want to call it from C++. The IDL
looks like this:
interface IHash : IDispatch
{
[id(1)] HRESULT DoHash([in] BSTR strSource,[out... more >>
How can ASP page call a C# method using "ArrayList" parameter???
Posted by sd at 10/4/2005 3:19:06 PM
QUESTION: How can my ASP page - which uses language="VBScript" - pass a
"System.Collections.ArrayList" object - as a parameter - to a C# method in
the middle-tier ???
----- Is it possible at all? - if not, what work-a-round is there?
I have no issues passing "string" parameters su... more >>
MessageBox in unmanaged C not modal
Posted by Stu Smith at 10/4/2005 9:16:39 AM
I have VB code calling C code in a class object. The C code can pop up
MessageBox warnings and errors, but they don't act like dialog boxes that
are modal (the user can go back to the VB GUI and click buttons). Is there
any way to make the VB side understand that a message box is being
display... more >>
Conversion Array to Variant?
Posted by Sebastian W at 10/4/2005 5:51:53 AM
Hello.
I need to pass a String-Array as a COM-VARIANT.
In VB6 ist very easy:
dim s(0 to 9) as string
dim x as variant
x=s
But in .net I can not get it working.
I tried using Marshal.GetNativeVariantForObject but it needs a IntPtr
to store the variant in.
How do I create/allocate/reserv... more >>
tlbimp.exe and C#
Posted by RicercatoreSbadato at 10/4/2005 5:20:23 AM
I'd like to use tlbimp to do a wrapper and put it in my C# code and not
to create an assembly... how can I do it?
... more >>
How to marshal array of Enums from VB6 to .NET
Posted by Joe at 10/4/2005 4:39:04 AM
I have an enum defined in managed code, e.g.:
public enum MyEnum
{
MyValue1,
MyValue2,
MyValue3
}
I have exposed a method which takes an array of MyEnum as an argument, e.g.:
public void MyMethod([In] ref MyEnum[] values)
{
....
}
And now I attempt to call this method from VB6 code a... more >>
C#/C++ interop and struct
Posted by Luca Beretta at 10/4/2005 3:39:04 AM
i've a C++ dll with a function that return a pointer to a struct, and i need to
call that function from a C# windows app.
i already try some ways founded on the MSDN and on the web but i cannot map
returned struct to a managed struct.
// C++ Code
struct NKAF
{
char* SectorCode;
char* C... more >>
Interop with PPT 2003 but not with PPT 2000
Posted by xalex at 10/3/2005 11:41:03 AM
Hi,
i used the primary interop assembly to access powerpoint from my .net
windows forms application. Powerpoint is uesd to extract single slides
into jpgs and is used to extract the caption of each slide. The app
works fine, if Office 2003 is installed and crashes with Office 2000.
What must i ... more >>
PIDL returned from IEnumIdList causes ExecutionEngineException when calling IShellFolder::GetDisplayNameOf on Windows 2000 (C#, Framework 2.0.50215)
Posted by Jim at 10/3/2005 10:27:11 AM
The problem i've stated in the topic occurs on Windows 2000, while the
code works perfectly on Windows XP.
Basically, what I'm trying to do is to recursively enumerate shell
folders starting at the root desktop. The currentFolder parameter for
the first call is obtained from SHGetDesktopFol... more >>
Getting "FileNotFoundException" when initialize a Word ApplicationCalass variable
Posted by ksskumar2000 NO[at]SPAM gmail.com at 10/3/2005 4:08:41 AM
Hi,
I have added following two reference under COM tab,
Microsoft Office 11.0 Object Library
Microsoft Word 11.0 Object Library
The software I have used:
Visual studio 1.14
Microsoft Office 2003
I have installed Office XP PIAs
My program:
using Microsoft.Office.Interop ;
... more >>
Passing NULL to a function that expects CONST RECT*
Posted by Stefan Rosi at 10/3/2005 12:00:00 AM
Hello everybody,
I need to call InvalidateRect from my C# program. This function is defined
as following
BOOL InvalidateRect( HWND hWnd, // handle to window CONST RECT*
lpRect, // rectangle coordinates BOOL bErase // erase state);
So I imported it in my ... more >>
C#, CreateFile and FileStream = Invalid Handler
Posted by Adam W at 10/1/2005 11:17:40 PM
Hi Gurus,
I've been playing with this C# code for 2 days and Googling like a Mad
Code Monkey. I hope you can help.
I'm working on a program that can read and write bits on the Floppy
Drive (A). The overall goal is to read/write blocks (512 bytes).
However, my CreateFile function is bring... more >>
how to marsal vb string() to unmanged legacy application?
Posted by learner at 10/1/2005 11:59:48 AM
I have done searches on msdn, newsgroup, lists, so far I don't see any
example showing me how to get array of string to legacy application ( C and
vbscript)
My mange dot net is compiled in a COM class assembly.
Without custom code, I get
Microsoft VBScript runtime error: Type mismatch
I ... more >>
Passing a string from managed code to unmanaged code
Posted by info NO[at]SPAM gerbenheinen.nl at 10/1/2005 7:40:39 AM
Hello,
I have a C# managed dll which I want to call from unmanaged C++.
For this I've exposed the functions from the C# code with COM. The code
is printed below.
I have a c# function 'PrintRef' which takes a string as a ref argument
and fills it with an arbitrary value.
However, when C++ c... more >>
|