|
johniboy wrote:
I seem to remember that when using DllImport you have to also add a reference to the dll in the project you're using it in.
No you don't...
You only need to add the reference if your NOT going to use DLLImport. Adding the reference allows you to use early binding so you can see the functions and enums and what-not as design time. It also allows you to use COM components and other .NET assemblies.
There are various types of .DLL's. Library .DLL's, like most of the Win32 API, you don't set a reference too. You just use DLLImport to get at the functions.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I am using enum to specify some options and
store the options by integer in database.
But when I unserialize the enum options
from database, I need to mapping the integer value
to the corresponding enum option by switch cases structure.
Are there any better method for mapping the integer
against the enum choice ?
Thanks
|
|
|
|
|
you can do a simple cast:
MyEnum myEnum = (MyEnum)myInteger;
Greets
Roland
Wenn der Computer wirklich alles kann, dann kann er mich mal kreuzweise.
(Manfred Schmidt)
Follow your Euro notes in their tracks
|
|
|
|
|
I noticed that C# provides a serialization, and i'd like to know, if i have a base abstract class, and a load of derived classes (like shapes - circle, rectangle,point), i operate with them in array or a list - i don't know what to use, if C# has an analog to vector in c++ (stl)... So how to save them all with serialization???
|
|
|
|
|
You don't need to do anything, the serialization framework will take care of serializing and deserializing heteregoneous objects.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
But where to find such examples???
Because i can't really understand the mechanism...
I remember in C++ i had to save the type of class before, to get it when i load the object...
But how does it know what object to create in C#?
|
|
|
|
|
Microsoft Excel cannot access the file 'C:\inetpub\wwwroot\AuditSystem\ExcelGen'. There are several possible reasons: • The file name or path name does not exist. • The file you're trying to open is being used by another program. Close the document in the other program, and try again. • The name of the workbook you're trying to save is the same as the name of another document that is read-only. Try saving the workbook with a different name.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Microsoft Excel cannot access the file 'C:\inetpub\wwwroot\AuditSystem\ExcelGen'. There are several possible reasons: • The file name or path name does not exist. • The file you're trying to open is being used by another program. Close the document in the other program, and try again. • The name of the workbook you're trying to save is the same as the name of another document that is read-only. Try saving the workbook with a different name.
hiiiiii
|
|
|
|
|
Im trying to add a refferance to a dll wrriten in visual studio 6 and im getting an error from Microsoft Development Environment saying:"This is not a valid assembly or com component.
|
|
|
|
|
Hi all,
Please Suggest me How to Generate a Excel Sheet in an WEB application with C# as backend with data fetching from Database.
Thanks
Deepak
hiiiiii
|
|
|
|
|
Creating a Excel sheet from C# is easy.
One way to do this is:
Get your database from your datasource.
Turn your data into an XML document
And then with a XSLT file
Display this document as an Excel file.
with XSLT you can include excel functions so calculation can be aready done when it loads.
If you generate an excel spread sheet and then save it as a xml sheet you'll see what your XSLT file should sort of look like
keep smilling.....b'coz smile is the shortest distance between people....
|
|
|
|
|
Hi all
I have a windows application that connects to a webservice. While the app is busy connecting to the webservice the network might be down, so the app kinda hangs while trying to connect to the webservice and I would like to be able to close the app but I'm unable cause the window doesn't respond to the mouse clicks.
If there's any way to close the app gracefully, it would be nice.
Thanks
|
|
|
|
|
You'd need to use threads or asynchronous web service calls then. I'd prefer the latter. The code will look like
public void CallWebService_ButtonClick(...)
{
new MethodInvoker(CallWebService).BeginInvoke(callback, ...);
}
private void CallWebService()
{
}
Just make sure that the UI updates you do from within CallWebService or from within the callback use Control.Invoke or Control.BeginInvoke[^].
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
|
Hi Iam new to .net pls help
Want to develop a component to retrieve first 10 records from a oracle table
Any one help
Lion Heart
Software Engineer
Bangalore
|
|
|
|
|
Have you actually tried anything yet? Were you just expecting someone to hand you the code and say "here you go"?
Getting the first 10 records is as simple as:
SELECT TOP 10 * FROM myTable
Beyond this you will find a download at the MS site for the ADO.NET libraries to work with Oracle. The records may be retrieved using a DataReader, or a DataAdapter and DataSet.
When/if you have some specific difficulties come and post the question.
|
|
|
|
|
i KNOW THIS QUERY
I WANT TO KNOW THE STEPS TO DEVELOP A COMPONENT USING THIS QUERY
ANY WAY THANKS FOR THIS
Lion Heart
Software Engineer
Bangalore
|
|
|
|
|
Please stop shouting.
There are plenty of articles (beginners' level, too) on MSDN and CP.
Please try searching and reading them first.
Regards,
mav
|
|
|
|
|
|
just wondering how you create a messagebox like the ones when installing VS.NET 2005
where you have your message then a horizontal line then some icons to left under line and button on right under line
the icons in het .NET setup where (i think) copy to clipboard, help and print.
is it a matter of creating your own model dialog or is this a new thing in 2005 that i cant find? (yet)
regards,
g00fy
|
|
|
|
|
where can i have the namespace Microsoft.PointOfService
the link for this namespace explanation from msdn is
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ccl/html/T_Microsoft_PointOfSer
vice_PosKeyboard.asp
plz help me urgently
regards
Arun Appukuttan
|
|
|
|
|
Hope u will get here...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ccl/html/N_Microsoft_PointOfService.asp
keep smilling.....b'coz smile is the shortest distance between people....
|
|
|
|
|
where can i have the namespace Microsoft.PointOfService
the link for this namespace explanation from msdn is
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ccl/html/T_Microsoft_PointOfSer
vice_PosKeyboard.asp
plz help me urgently
regards
Arun Appukuttan
|
|
|
|
|
Obviously in an embedded or mobile OS from Microsoft, if you read the breadcrumbs.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
Really? This is what I see at the top of the page:
MSDN Home > MSDN Library > Mobile and Embedded Development > Embedded Operating System Development > Microsoft POS for .NET Overview > POS for .NET > Microsoft.PointOfService
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|