|
Hmm.. Using TypeLibConverter, if you don't mind can you post the code snippet. I am just curious. Anyway I tried like this C#.
LoadTypeLibEx(strCOMLibName, REGKIND.REGKIND_DEFAULT, out oCOMTypeLib);<br />
if(oCOMTypeLib != null)<br />
{<br />
TYPELIBATTR oTypeLibAttributes = new TYPELIBATTR();<br />
Type oType = oTypeLibAttributes.GetType();<br />
..<br />
..<br />
oCOMTypeLib.GetLibAttr(out hwndTLibAttr);<br />
"...if you don't want to hear things that piss you off don't piss off other people. SIMPLE." - Steven Hicks This signature was created by "Code Project Quoter".
|
|
|
|
|
This is what I did Kant:
LoadTypeLibEx(lstrFilename, RegKind.RegKind_None, out typeLib );
if (typeLib != null)
{
AssemblyBuilder asm = converter.ConvertTypeLibToAssembly(typeLib, "tmplib.dll", 0, eventHandler, null, null, null, null );
Type[] types = asm.GetTypes();
}
Once you have this, you can loop around the types to get the methods...
for (int i = 0; i < types.Length; i++)
{
MemberInfo[] meths = types[i].GetMembers();
for (int j = 0; j < meths.Length; j++)
{
MessageBox.Show(meths[j].Name);
}
}
Hope this is useful to you. Thanks again for your help,
Simon.
|
|
|
|
|
After your post, I read the information about TypeLibConverter . I went in a different route to get the info. (I followed the same path I did in C++)
Anyway, I want to write a small article about this. Do you want to jump in?
Except for MSDN, I haven't found any useful info about reading COM information via C# anywhere.
"...if you don't want to hear things that piss you off don't piss off other people. SIMPLE." - Steven Hicks This signature was created by "Code Project Quoter".
|
|
|
|
|
Hi
I don't really think I know enough to write an article to be honest. Also, I'm not very good at explaining stuff in a concise fashion!
Feel free to ask me any questions or use any of my code in the article though (and I'll rate it a 5 for ya! ).
Cheers,
Simon.
|
|
|
|
|
I have created a UserControl that allaws a DataObject to be dragged.
The DataObject contains a Bitmap and string.
When the DataOject is dropped into MSWord. MSWord displays the text.
Does anyone know our to force MSWord to display the Bitmap.
I have tried adding the Bitmap to the DataObject first followed by the string.
But this has no effect.
|
|
|
|
|
hi, i have a real quick question. I just need to find the X,Y (0,0) for the location of my programs Window in relation to the entire Desktop. Reason being is i use a API call called GetPixel() that uses X,Y (location) as a overload...but its X,Y are global X,Y i.e the entire desktop. I need to transfer my X,Y inside my program over to Global Desktop X,Y's. is there a easy way to do this ?
Thanks for your help, Time. If you need me to explain clearer please let me know
Jesse M.
The Code Project Is Your Friend...
|
|
|
|
|
Use Form.PointToScreen().
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Thank you very much Sir.
Jesse M
The Code Project Is Your Friend...
|
|
|
|
|
I would like to know how can i combine and connect different projects into one big project?
e.g.
i have an existing project - TEST_A. I want to add this project into my new project (current working this one) - TEST_B.
I know i can add "existing project" into my current project. But i don't know how to connect both project, so that i can access the form in TEST_A.
Please help!!!
|
|
|
|
|
Create a blank solution, then you can add as many projects to that solution. To add a new solution click on File > New > Blank Solution.
|
|
|
|
|
But how can i access the items in different projecT?
|
|
|
|
|
HELLO,
here is a little problem that i am facing.
in a foreach( ) loop, i want to display a message box or anything,
but i want to display that after some gap. i.e. PRODUCING SOME DELAY
is there any method like delay() in c/c++?
i found timer class for windows forms in c#, but there is some problem
with it. it just says invalid com component exception after each
display of the message box. i just want to have a gap of 30 seconds. if there is anyother way plz guide me.
can someone guide me on this. A piece of code or link.
i would really be thankful on this help.
LOOKING FOR HELP
ASIM.
Asim
|
|
|
|
|
Thread.Sleep(1500);
will cause a 1.5 second pause before going to the next line of code..
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
Can some one point me to a good resource on WMI using c#
Thanks
|
|
|
|
|
There is very good one here. I don't have the link now,but search this site or go to C# section.You can find it there.
Mazy
No sig. available now.
|
|
|
|
|
Hi!
In one of my base classes, I have a function which receive a callback from another application. In this function, I would like to access Excel.Application object but I receive an exception: QueryInterface for interface Excel._Application failed.
If my class were inherited from Windows.Forms, I could use BeginInvoke function. So I would like to know a way to access Excel.Application object in my callback function.
Build with C# for Excel Object 9.0 (Excel 2000)
Thanks in advance!
|
|
|
|
|
Can you point me to a book or article that explains how to create tabbed forms?
Thank you
P.S.
What is the equivelent of BeginWaitCursor()?
|
|
|
|
|
i am not sure about any tabbed form articles, youll have to search.. but they are built into windows.forms.. they are listed in your toolbox as 'TabControl'.. you should be able to use it pretty easy..
and here is the cursor question
Cursor.Current = Cursors.WaitCursor;
Cursor.Current = Cursors.Default
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
Will I do not know of an article on the topic, it is very easy to do in Visual Studio.
Place a TabControl on your blank form. Right click on it and select New Tab. Now start placing controls on that tab. At any time, right click the tab control and select Add Tab to make more tabs. You can switch between the tabs while in the designer.
Rocky Moore <><
|
|
|
|
|
That was just too easy. Thanks!
|
|
|
|
|
I have an integer representing a month, what is the best way to convert it into the full month name?
thanks
U.M.
It ain't what you know that matters.
Uncle Monkey
|
|
|
|
|
I don't really know if there is a built-in function (I looked in System.DateTime but didn't see one) so I threw this one together:
private string MonthName(int iMonth)<br />
{<br />
string[] sMonths = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };<br />
return sMonths[iMonth] ;<br />
}
|
|
|
|
|
thanks for that GISnet.
I didn't see one either and wondered if I'd missed something really obvious and was being stoopid
It ain't what you know that matters.
U.M.
|
|
|
|
|
System.Globalization.DateTimeFormatInfo.MonthNames
|
|
|
|
|
Ok now I feel .
|
|
|
|