|
Hi
I have converted one project vs 2003 to vs2005.But I getting error like this
Exception Details: System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
Date:<%=DateTime.Now%>I got that error in Include file.Just i want to know how to get DateTime Date:<%=DateTime.Now%> .
gmahi
|
|
|
|
|
Hi guys,
I am trying to import a function from a visual c++ dll which uses cstring. I keep getting an error saying object reference not set to an instance of an object. I believe it is because of cstring and have read a few posts which pretty much explain that it is not possible to get around this without writing a wrapper in c++. Unfortunately I have never written a wrapper script and hopefully you have a solution around this. Please help!!!
S
sasa
|
|
|
|
|
I replied a suggestion (just now) on your original thread. Try that, if it still fails, reply to this message, and I will see if I can help with that wrapper
|
|
|
|
|
Hi leppie, What do you mean by original thread, this is the only thread I have.
Please respond to this.
Thanks
S
sasa
|
|
|
|
|
|
Thank you for your response. I get the error saying Methods type signature is not pinvoke compatible. Any ideas?
S
sasa
|
|
|
|
|
hi,
How do I add numbers in a listBox?
eg. I have a list of numbers in my listbox and I want to add them and place the result in a textBox.
|
|
|
|
|
Use a variable to maintain a running sum. Iterate through each item in the listbox. For each iteration, convert the value of the current item to a number and add its value to the current value of the running sum variable. Finally, write the value of the running sum variable to your textbox.
Paul
|
|
|
|
|
Here is the code if you require
int sum =0;
for(int i=0;i
|
|
|
|
|
What is the difference between dispose() and finalize()methods in c#?
|
|
|
|
|
Dineshraj wrote: dispose() and finalize()methods in c#?
Dispose() is an implementation of the IDisposable interface. It is used to clean up unmanaged resources from an object when it is no longer needed. You explicitly call the Dispose method.
The Finalize method (using the destructor syntax in C#) is called when the Garbage collector cleans up the object. It should not be created unless needed as it slows garbage collection. If it is needed it most likely will call the Dispose method (so that all your clean up code is in one place). You have no control over when the finaliser is called.
|
|
|
|
|
Does this mean that explicity creating a destructor, say:
~MyClass()
{
...
}
is just a different way of writing:
protected override void Finalize()
{
...
}
?
"It was the day before today.... I remember it like it was yesterday."
-Moleman
|
|
|
|
|
The ~ syntax will implicitly call the finalizer.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Dispose is a method on an interface (IDisposable) that tells you that you can free up some resources. It is not guaranteed to be called, but can be called either explicitly via the MyObject.Dispose method, or implicitly when the instance has been wrapped in an using block, e.g.
using (SqlConnection conn = new SqlConnection())
{
..
} The finalizer is run by the garbage collector, so you have no idea when it will run (under normal conditions that is - it is possible to explicitly call a Finalizer, but this is generally bad practice). Now, if you implement IDisposable.Dispose() then it is normally good practice to suppress the Finalizer. This is done by calling the method GC.SuppressFinalize() in the Dispose method. To this end, I tend to write a message to the trace logs if I get into a Finalizer when I have a Dispose method. By doing this, I can see where I haven't freed up resources explicitly.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: To this end, I tend to write a message to the trace logs if I get into a Finalizer when I have a Dispose method. By doing this, I can see where I haven't freed up resources explicitly.
Now that is an excellent idea!
|
|
|
|
|
|
First of all, you generally don't want to write a finalizer unless you really need to. There are a lot of rules that should be followed in a finalizer and a lot of assumptions that can normally be made about the state of the objects and the runtime are not valid inside a finalizer. They add a cost to your object as well, even if the finalizer is never called.
That being said, as others have pointed out, Dispose is part of the IDisposable interface and helps implement the Dispose pattern. This pattern provides an explicit method for cleaning up resources.
A finalizer provides for implicit cleanup and, if your class has one, will be automatically called at some non-determistic time as part of the garbage collection process.
|
|
|
|
|
|
|
|
I have used Gios PDF .NET library for PDF creation. My requirement is that, i dont want to create new page evary time for new tables, i have to use 2 line break after each table in PDF Page. is it possible to write multiple tables on same PDFPage using 2 line break after each tables.(I want to avoid unnecessary spaces on PDFPage).
Please send me source code in C#.net, thanks in advance.
Thanks,
Sanjeev Ranjan
-- modified at 9:09 Friday 31st August, 2007
|
|
|
|
|
|
i have to pass the username name and password to another form using the query string.
Is there any way to encrypt the query string ? So that the data can we secured
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
This is never a good idea. Even with encrypted text, the query string is still going to be visible thereby allowing somebody else to steal and use the query string.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
i know it will be visible , but the information will not be directly visible to others
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|