all groups > dotnet interop > august 2003
Filter by week: 1 2 3 4 5
Translating 64-bit API functions
Posted by Robert Jacobson at 8/31/2003 5:59:08 PM
Hi,
According to MSDN, I should be using the 64-bit compatible SetWindowsLongPtr
function instead of SetWindowsLong. SetWindowsLongPtr is defined as:
LONG_PTR SetWindowLongPtr(HWND hWnd,
int nIndex,
LONG_PTR dwNewLong
);
What is the best way to call this function (and similar 6... more >>
Trap Script Errors in Embedded Browser
Posted by Greg Bielleman at 8/31/2003 1:08:49 PM
I have an built an winforms app in C# which has IE embedded in it.
I have implemented IDocHostUIHandler which does moct of what I want.
The only outstanding issue I have is how do I trap script errors in the web
pages.
Anyone go a sample in C# or VB.net of how I can do this?
Cheers
Greg ... more >>
SHGetDesktopFolder in VB.NET
Posted by Will at 8/30/2003 10:24:49 AM
Hi
I would like to use the shell function SHGetDesktopFolder
from within VB.NET, but I don't know how I can use it
without an implementation of the IShellFolder interface,
and was wondering if anyone could point out an answer, or
resources that would provide an answer
Thanks in advance... more >>
MSDN article: Deploying an Application for COM Access REALLY unclear (to me...)
Posted by José Joye at 8/29/2003 9:19:56 PM
Reeading the MSDN page:
http://msdn.microsoft.com/library/en-us/cpguide/html/cpcondeployingapplicationforcomaccess.asp?frame=true
makes me really skeptic.
I thought that using regasm /tlb:blabla.tlb blabla.dll will register the
assembly so as to be used by COM compliant clients.
To me thi... more >>
Help: Displaying Web OLAP cube in a web chart
Posted by mrwoopey NO[at]SPAM yahoo.com at 8/29/2003 12:10:08 PM
Hi,
I have a web based OLAP cube (based on the SQL 2000 resource kit
version) and I need to know how to display it in a chart (web based).
I know that there are 3rd party tools but I need a cheaper way to do
this.
Please post any code or links. You help is greatly appreciated!
Thanks,
... more >>
Handling Browser control's Alert()'s
Posted by fryguy NO[at]SPAM yahoo.com at 8/29/2003 12:01:25 PM
Situation:
-- VB.NET Windows app with embedded Browser control
-- Browser control loads form-based text entry web app (not ours, I
have no control over the HTML or the script that comes up)
-- Pages of web app contain field validation via JavaScript
-- Validation throws alert()'s to indicate fa... more >>
C# dll calling late-bound COM via InvokeMember gives type mismatch
Posted by Joshua B. Helm at 8/29/2003 10:53:49 AM
I have an extremely large (mostly VB6-based) project that makes extensive
use of late-binding COM. We are attempting to migrate slowly to .NET by
converting a piece at a time. I am attempting to write a replacement for
one of our dlls that late-binds to COM objects. I'm using Type.InvokeMember... more >>
CCW and method parameters being classes?????
Posted by José Joye at 8/28/2003 5:31:11 PM
Hello,
I'm having a problem with CCW and method parameters. Some of the parameters
are classes.
It seems that these classes (or at least the properties inside the class)
are not seen from my VB client
Do I have to declare an interface for these classes (eg. TransModes)? If
yes, does anyone k... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
PInvoke and GetPrivateProfileString
Posted by Daniel F. Devine at 8/28/2003 2:52:21 PM
Hi -
The following snippet of code:
class Class1
{
[DllImport("kernel32")]
public static extern ulong
GetPrivateProfileString([MarshalAs(UnmanagedType.LPStr)]string app,
[MarshalAs(UnmanagedType.LPStr)]string key,
[MarshalAs(UnmanagedType.LPStr)]string def,
StringBuilder r... more >>
GetObject and C#
Posted by Magne Ryholt at 8/28/2003 11:09:23 AM
I have a .exe application which exposes several COM
In VB 6.0 I can instantiate a class by using Set myClass = GetObject(path,
progid) where path is the path on harddisk to a file (actually a .INI file
in this case) and progid is the progid in registry.
The .exe was not running, but was started ... more >>
problems with CCW
Posted by Perecli Manole at 8/28/2003 1:28:33 AM
I have several problems with COM Callable Wrappers implementation. Please
answer any of the ones you know:
1. Can't get the ProgIdAttribute("Name") to work. I use
ComClassAttribute(guid,guid,guid) for all my exposed classes so I was
wondering if there is a conflict between these two Attributes... more >>
Syntax of DllImport's EntryPoint field
Posted by Wu YiFei at 8/28/2003 12:43:24 AM
Hi,
I try to call c function in C#,What is the syntax of
DllImport's EntryPoint field?
Why some of extern method need to point out this field
while some of them do not need?
In my project,
A C function defination is
//****************
__declspec(dllexport) SbVec2s
SoWinFullVwrGetVie... more >>
ActiveX control disappears from Windows form in VS.NET
Posted by Severino at 8/28/2003 12:42:58 AM
Hello,
I've developed a MFC based ActiveX control using VC++ 6.
In the last days I've tested the control compatibility with the various
language of Visual Studio.NET and it seemed to work correctly.
Today I was forced to change the control version stored inside the .odl file
from 7.3 to 7.4 a... more >>
Automating Excel WorkBook Suppress Excel Message Boxes Possible?
Posted by unemotionalhumanoid at 8/27/2003 11:45:01 PM
I am writing an application that gets data from excel worksheets, it works
fine for most workbooks but when I open some by using the following line of
code:
_xlApp = new Excel.ApplicationClass();
Excel.Workbook WorkBook1 = _xlApp.Workbooks.Open(FilePath,0,true, 5,"",
"", true, Excel... more >>
Can I access a remote com server with only cusotm interfaces from c#?
Posted by Howard Swope at 8/27/2003 2:46:14 PM
I am try to access a remote com server from my c# app. The server has no
dispatch interfaces. Is this possible?
--
Howard Swope
Software Engineer
Spitz, Inc [http://www.spitzinc.com]
... more >>
P/Invoke: Use StringBuilder for LPVOID type
Posted by John Ting at 8/27/2003 11:37:04 AM
Hi,
I wrote a C# wrapper for the ReadConsole Win32API as following:
(Original unmanaged signature)
BOOL ReadConsole(
HANDLE hConsoleInput,
LPVOID lpBuffer,
DWORD nNumberOfCharsToRead,
LPDWORD lpNumberOfCharsRead,
LPVOID lpReserved
);
(Managed signature)
[DllImport(KERNEL32... more >>
VB Late Binding Vs ASP - Using Interop Services
Posted by Christopher Pragash at 8/26/2003 11:04:17 PM
Hello All,
I have a problem with ASP & VB 6 using an Interop Assembly . I marshal an
array in VB.NET, mark it as <MarshalAsAttribute(UnmanagedType.LPArray)>, and
I am able to retrieve the correct values in VB6 using Late Binding, not
predefining specific datatypes for the array. But ASP seems ... more >>
MarshalAsAttribute(UnManagedType.LPArray)
Posted by Christopher Pragash at 8/26/2003 7:48:15 PM
Hello,
I am trying to Marshal an Array consisting of custom Objects from VB.NET to
VB6. The function signature in VB.NET is like the following:
Public Function GetItemArrary (Byval ItemCode as String) as
<MarshalAsAttribute(UnmanagedType.LPArray)> Array
End Function
When I use "Regasm... more >>
MIDI in -NET
Posted by Lars Lundstedt at 8/26/2003 5:30:09 PM
Has anyone tried using the Win32 low level MIDI functions in .NET/C#?
What I'm trying to do is send and receive sysex-messages but I just can't
figure out how to declare and use the
midi* APIs.
I've successfully declared and used the APIs for getting device caps and
opening and sending shor... more >>
modules
Posted by Perecli Manole at 8/26/2003 2:48:01 PM
How can I expose VB.NET modules (shared classes) through a COM callable
wrapper? This works with classes but not with modules:
<ProgId("Loconet_caca"),
ComClass("383F5F0D-ABFE-414C-B71C-E2369AA8BCCD",
"BE00CB07-54ED-4322-8075-125F3F0D2EF2",
"6444E0EF-91C5-4C4A-992A-3CE8325F1528")> Public ... more >>
Access Denied Exception thrown from Activator.CreateInstance(Type)
Posted by Howard Swope at 8/26/2003 2:04:07 PM
I am trying to get a reference to an ATL COM singleton object running on a
Windows CE 4.1 (w/DCOM) device from a C# client. I have no problem accessing
it from a Win32 client. The code that I am using to instanciate the object
is:
Type t = Type.GetTypeFromCLSID(guid,"machinename",true);
obj... more >>
MQAX200.DLL - Very Technical question!
Posted by farah_roberto NO[at]SPAM hotmail.com at 8/26/2003 11:06:00 AM
Hi everybody,
I have a customer using Win2K, MQSeries 5.2 and MQAX200.DLL from
VB.NET using interop.
I could get some crash dumps and see that MQAX200.DLL is raising
exceptions from DLLUnregisterServer function.
During analysis I could see that File Version from MQAX200 is
1.0.0.1 whe... more >>
COM Interop & HTTP Binary Remoting
Posted by Christopher Pragash at 8/25/2003 8:53:19 PM
Hello All,
I am in the process of migrating the business layer of a web application
into VB.NET and also implementing HTTP Binary Remoting between the Business
Object Server and the Web Server (IIS) from where ASP pages call the
business objects.
I have a very strange problem. The ASP and .... more >>
Marshalling Nested Structures
Posted by news.microsoft.com at 8/25/2003 5:04:41 PM
Hi there,
I have a wiered scenario. I have two structures defined this way in
unmanaged dll.
struct A{
char * name;
int ID;
};
struct B{
struct A* record;
};
Then I have a function in the dll that consumes a pointer to struct B. like
this.
int InitRecord(st... more >>
Substitute for marshalling interfaces
Posted by Daniel Weber at 8/25/2003 1:38:55 PM
Hi there.
A method of my implementation of a COM interface takes an interface as
parameter, which I never use. I could save the code for the definition of
that interface, but what would be a substitute for that parameter ?? Maybe
IntPtr ??
Thanks
Daniel
... more >>
Using UxTheme.dll with C#..
Posted by Kieron Lanning at 8/25/2003 11:38:00 AM
Hi,
Does anyone know of any tutorials of using the UxTheme.dll functions from
within a C# app...i seem to be having a serious 'brain fade' with
this...can't draw the correct fonts etc...any help would be appreciated.
Cheers
Kieron
... more >>
using GetThemeColor from C#...
Posted by Kieron Lanning at 8/23/2003 2:28:11 PM
Hi,
I've been trying use the GetThemeColor function from the uxTheme.dll in a C#
app...but i can't seen to get a valid result? Could someone tell me what I'm
doing wrong here??
[DllImport("uxTheme.dll", EntryPoint="GetThemeColor", SetLastError=true,
CharSet = CharSet.Auto, ExactSpelling = tr... more >>
Translate COM interface
Posted by Franz at 8/22/2003 11:06:16 PM
Actually I want to access the IHtmlDocument2Ptr interface, but I find that I can't add mshtml.dll as a reference. Therefore I think
I have to translate the COM interface(which is inside mshtml.h) to C#. But it is very complicate to translate, because it contains
other inferfaces and many methods a... more >>
using Marshal.ReallocHGlobal
Posted by news.microsoft.com at 8/22/2003 12:03:16 PM
Hi there,
I am trying to use marshal.ReallocHGlobal function.
My unmanaged dll requires call back functions that the unmanaged routine can
use to allocate, reallocate and free memory. For allocating and freeing
memory I can use the Marshal.AllocHGlobal and Marshal.FreeHGlobal functions.
... more >>
Can't call .NET to .NET through COM+
Posted by steve at 8/21/2003 7:30:09 PM
I have .NET assemblies that are registred in COM+ as
Server applications (own process). I can create and call
them from C++ code with no problem.
If I try to create them from .NET code, the COM+
application starts and the .NET assembly is loaded in the
DLLHOST.EXE process space, but I ge... more >>
Cast __comObject?
Posted by Bogdan CIRLIG at 8/21/2003 3:56:54 PM
Hi,
I built a Serviced Component in .Net and registered it as a COM+. Now, all
[in] parameters declared as Object work just fine but the value I get inside
the managed code is of type System.__comObject. From here, I'm stuck... I've
searched on the Internet and I couldn't find nothing on how t... more >>
Native C++ Client To Call Managed C++ Web Service
Posted by Tim Rogers at 8/21/2003 12:25:04 PM
We've currently got a C++ client/server app that uses DCOM in order to make
remote calls. We want to replace DCOM with a .NET Web Service. The server
piece seems clear to me. I can write it using MC++ and then can call my
native C++ server code from within the Web Service. What I am unsure ab... more >>
Re: ASP 3.0 + ServicedComponent COM method parameter type mismatch
Posted by Bogdan CIRLIG at 8/21/2003 9:25:48 AM
Hi all,
Interesting thing happening with ASP 3.0. We are in process of migrating our
old ASP 3.0 to ASPX and one of the stages is to replace the middle tier
components.
Now, I have created a simple COM from .Net by implementing the
ServicedComponent. I defined a class inside to be used a in... more >>
Calling Windows API from C#
Posted by sonu at 8/21/2003 4:56:55 AM
Hi,
I am calling "GetPrivateProfileString" function to
retrieve some key/value from my ini file in C# code.
I have used the DllImport Method to import the function
from Kernel32.dll.
For some reason, when i call this, it does not seem to
work. In the same scenario , another API funct... more >>
COM+ with C# Client as well as C# ServicedComponent......
Posted by ideas2050 NO[at]SPAM math.net at 8/21/2003 4:13:41 AM
[SUMMARY]:
This is general query seeking opinions about COM+ Development wherein
Server [COM+ Components] is developed in C# [as ServicedComponent] and
Client accessing that across machines is also C#.
Wish to seek experienced words on issues of COM-.NET interop that is
playing major decisi... more >>
volatile fields
Posted by brianos NO[at]SPAM hotmail.com at 8/21/2003 3:09:52 AM
I am struggling to understand why Volatile fields exist in C#.
The documentation states that they ensure the required order of
processing.. the example given by Microsoft is :
using System;
using System.Threading;
class Test
{
public static int result;
public static volatile b... more >>
structure with char[]
Posted by Stephen Richardson at 8/20/2003 3:31:48 PM
I have a C++ dll which returns a structure, the structure
contains a char[21] variable, as shown below.
struct MyCStruct
{
short iNumber;
char Name[21];
};
I've declared a structure in C# as shown below
[StructureLayout[LayoutKind.Sequential)]
class MyCSharpStruct
{
... more >>
nested structures and ref parameter
Posted by Nikhil Patel at 8/20/2003 2:54:15 PM
Hi all,
I am trying to make an API call that uses following two structures:
<StructLayout(LayoutKind.Explicit)> Private Structure
SECURITY_QUALITY_OF_SERVICE
<FieldOffset(0)> Dim Length As Integer
<FieldOffset(4)> Dim Impersonationlevel As Short
<FieldOffset(6)> Dim ContextTrackingMo... more >>
vb 6 to vb dot net
Posted by melbin NO[at]SPAM achayans.com at 8/20/2003 10:06:54 AM
Hi,
I am having a VB6 application for Accounting.
What advantage i can say if i convert into VB dot net ?
why people convert vb6 application to vb dot net ?
replyy
paul... more >>
Marshal.PtrToStructure Returns Garbage
Posted by Charles Parker at 8/20/2003 9:05:59 AM
I have a COM object that allocates and passes back a pointer to an array of
DATA_MAP structures. A test app written in C++ work correctly however a C#
..NET app returns garbage. In .NET the managed structure is defined as:
[StructLayout(LayoutKind.Sequential)]
public struct DATA_MAP
{
[M... more >>
.NET interop with VB5
Posted by bears at 8/19/2003 3:51:08 PM
Hi,
Anyone knows if there are any potential errors/harms if
VB5 Active EXE interop with .NET DLL? Is .NET supposed to
only to interop with VB6?
Thanks,... more >>
CreateObject() function and Process ID
Posted by Cliff Spielman at 8/18/2003 10:21:36 PM
Does anybody know how to determine the Process ID associated with the
resulting COM object?
For example, suppose I use CreateObject to launch an instance of MS Word.
How can I determine the Process ID of the resulting MS Word instance?
objApp = CreateObject("Word.Application)
... more >>
How do I call a COM method from C# that expects a VT_BOOL
Posted by Fred Zolar at 8/18/2003 1:16:40 PM
How do I call a COM method that expects a VT_BOOL from C# ? (Scroll to the
bottom to see my failed C# attempt to call.)
// Declaration of interface for COM object
[ComImport(), Guid("b722bccb-4e68-101b-a2bc-00aa00404770"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interfac... more >>
MDI child forms
Posted by XingZheng at 8/18/2003 9:52:46 AM
Hi
I want to create MDI child forms from hWnd of Dialog in Visual C++. Could
you tell me how to write it.
XingZheng
... more >>
Benefits of CLR 1.1 for hosting WebBrowser over 1.0sp2 ?
Posted by JohnDoe650 NO[at]SPAM hotmail.com at 8/18/2003 1:24:30 AM
Hi,
I'm starting a new application that needs to host the WebBrowser
control, I just wondered if there is any benefit in using version 1.1
of the framework over 1.0sp2.
Any ideas about COM interop being improved, better MSHTML/WebBrowser
integration into the runtime, stability improvements ... more >>
create c# COM Component and call it from Visual basic 6.0
Posted by jehle NO[at]SPAM centralnet.ch at 8/16/2003 6:00:01 AM
I need to create an COM componet in c#.net.
First I made all steps from the Knowledge Base Article 815808 "How To:
Install an
Assembly into the Global Assembly Cashe in Visual C# .NET"
I placed the GACDemo.dll file drag and drop into the
\%SystemRoot%\Assembly\ path
After that I register... more >>
Config file setting in COM
Posted by Mike Hale at 8/15/2003 10:59:17 AM
I have a .Net component that I need to call from a VB6 client. I have
"Register for COM Interop" checked in Project Properties...Configuration
Properties... Build. The problem is that the .net component uses a setting
in a congfig file, which fails when being called from the VB6 client. (I
have ... more >>
.NET Dataset in VB 6?
Posted by Tim Werth at 8/14/2003 10:30:13 PM
I am writing an app in .NET that makes use of DataSets. Some of my clients
will be writting in VB 6.0. Can I pass a .NET DataSet back to a VB 6.0
client?
... more >>
powerbuilder and .NET integration via interop
Posted by Hazzard at 8/14/2003 6:29:07 PM
I am an interop newbie. I just received the following code as an idea to
exchange XML data between Powerbuilder components via PBNI, the PB native
interface and .NET assemblies. I think I said that right.
Would the 'dotNetWrapper' as mentioned below just be a class that would then
just say deser... more >>
ocx - .NET interop
Posted by Ashwin Kambli at 8/14/2003 4:04:26 PM
Hi,
I have an ActiveX component (.OCX) which I currently use in a IE browser as
an embedded object. Now, I need to write a C#.NET wrapper to this OCX so
that I can use the OCX in a stand alone application too. I tried a test C#
console application to achieve this. In my .NET project I added refe... more >>
|