I've heard that some of these features can be found in the System.Management namespace. I have personally found it easier to just wrap the pertinent SDK calls using PInvoke. I seem to recall reading an article or two related to WMI and PInvoke/DACL stuff on this website. Try doing a search.
I have created a Windows Form control and also an application that uses it.
When I reference the control, if I don't choose "copy local = true", the it throws a System.IO.FileNotFoundException.
What may be the reason?
Yes, you are right...
In fact, the correct place for this assembly would be the GAC (Global Assembly Cache). However, I don't know how to tell my setup program to place the assembly into the GAC. (I am creating a Deployment Project)
Does anyone have any source examples that can read the metadata from a PE file? I have Serge Lidin's book _Inside Microsoft .NET Assembler_, but there seems to be a few errors in it, and some of the descriptions are a bit confusing.
I'm running on Visual Studio.NET 2003. Is there a quick way to implement an interface via a keystroke or menu option? Some of the interfaces in .NET have many member that need to be implementented, so what I'm looking for is some sort of keystroke or menu option that will fill in empty functions for all the members that need to be implemented.
Thanks in advance.
Kyosa Jamie Nordmeyer - Cho Dan
Portland, Oregon, USA
Now that this Dll needs to access and print from IE, I had to package as CAB file using VS.NET Setup and Deployment Project (CAB Project). Instead of DLL, I gave PrintCAb.cab. But now it is saying 'Object does'nt support this property/method'
How to refer the methods in the DLL if I give this CAB now?
When you declare a variable it gets created in RAM. If your available RAM is low then the system might swap some stuff to disk in order to free up some RAM, but even in that case your variable would stil reside in RAM. As far as I know you really don't have much control over that.
The easiest way to get a connection string to do what you want is to use the Universal Data Link dialog. To do this:
Create a new text file on the desktop
Rename it to 'access.udl' (the icon should change to a computer in front of a table)
Double-click the icon
You should now get a property sheet labelled 'Data Link Properties'.
Go to the Provider tab and select the Microsoft Jet 4.0 OLE DB Provider. Go to Connection and browse to the database you want to open, then ensure the username and password are correct. Choose 'Test Connection' to check you're all right so far. On the Advanced tab, under Access Permissions uncheck Share Deny None and check Share Exclusive. Click OK.
Now open the .UDL file in Notepad. It should look something like:
; Everything after this line is an OLE DB initstring
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Work\MyDB.mdb;Mode=Share Deny Read|Share Deny Write;Persist Security Info=False
I hope that shows alright on your browser; CodeProject converts [semicolon][P] into a smiley...;P
Copy the initialisation string into your code, and you should be done.