473,320 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

GetObject??

Is there a method like GetObject in vb to get an instance of current object
runnig??
Nov 16 '05 #1
3 4741
Hi
If you mean the API function GetObject of the Gdi32.lib , then that you
can use with both vb and C# . you can use the DllImport to use it either
in C# or VB.

Mohamed M .Mahfouz
Developer Support Engineer
ITWorx on behalf of Microsoft EMEA GTSC

Nov 16 '05 #2
No,I mean GetObject method in VB to get an instance of Com object.
the singnature of GetObject in vb as follow
Public Function GetObject( _
Optional ByVal PathName As String = Nothing, _
Optional ByVal Class As String = Nothing _
) As ObjectI need a method like that in C#"Mohamoss"
<mo************@egdsc.microsoft.com> wrote in message
news:Kd**************@TK2MSFTNGXA01.phx.gbl...
Hi
If you mean the API function GetObject of the Gdi32.lib , then that you
can use with both vb and C# . you can use the DllImport to use it either in C# or VB.

Mohamed M .Mahfouz
Developer Support Engineer
ITWorx on behalf of Microsoft EMEA GTSC

Nov 16 '05 #3
You can use the Type.GetTypeFromCLSID method to get a type for your COM
object, and then use Activator.CreatInstance to create an instance of
the type.

Regards,
Joakim

perspolis wrote:
Is there a method like GetObject in vb to get an instance of current object
runnig??

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Rich | last post by:
Hello, I have not been working with ASP for too long at this time and am not real familiar with a lot of things about ASP. I have searched for articles on the following question but not come up...
2
by: CJM | last post by:
I'm building an ASP app that uses Windows Authentication (IWA). I have an authentication routine that assesses if & how the user can use the application (see code snippet below). Users of a...
5
by: Andrei | last post by:
Hello, I posted yesterday the same problem, but now I want to be more specific about it. My intention is to create a windows service to process some Word documents. If I use CreateObject to...
3
by: Otie | last post by:
I found the following under the GetObject help notes and in the example for GetObject: "This example uses the GetObject function to get a reference to a specific Microsoft Excel worksheet...
1
by: Martyn Gwynne | last post by:
I am progressing with GetObject .. The following code will open and print a report. I enquired how to open, maximise WITHOUT printing by default and it was suggested that I look at further...
2
by: Randy Harris | last post by:
I'm going nuts trying to figure this out, sure hope someone can help. My application uses TransferSpreadsheet to insert data into an existing Excel spreadsheet (which works), then opens and...
17
by: ad | last post by:
We can use GetObject to load the instance of COM form file like: Dim CADObject As Object CADObject = GetObject("C:\CAD\SCHEMA.CAD") How can we implement the two statements above in CSharp?
3
by: ]-[aTc]-[ | last post by:
I'm trying to add users to active directing using asp.net forms. All the example on the web are for VB and using the VB method GetObject. Is there a C# sharp equivalent of GetObject or can...
1
by: joe | last post by:
We just moved a legacy asp application to a Win2003 server. The following line of code: set objUser = GetObject("WinNT://" & strDomain & "/" & strUserName & ",user") Raises the following...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.