|
You probably just have to reset your MemoryStream. After you write everything and before you read, do this:
ms.Seek(0, SeekOrigin.Begin);
|
|
|
|
|
Thanks
|
|
|
|
|
How Caan i Rotate a line with a S pecified Degree?
So What !!!
|
|
|
|
|
If you are familiar with Graphics programming and matrix transforms this[^] might help.
|
|
|
|
|
hi
i want know that what is shell protection and how to do that ?
and how to protect my exe from copy (with shell protection) ?
|
|
|
|
|
|
shell protection is the mechanism that protect from exe files . and i want to protect exe files.
how to do that ?
|
|
|
|
|
Protect .exe files from what? Decompilation?
|
|
|
|
|
Hello,
I have a connection string in my config file. That connection string is used to connect to the SQL server. However, the server requires the userid, and password to connect. These two values I will be retrieving from the registry.
Now, how can I append these two values to my connection string, so that the application will use it to connect ot the server.
Thank you.
|
|
|
|
|
Well, if you change the connection string using ConfigurationManager, you'll have to save it and that will leave your user id and password in the config file. What I would suggest that you do instead of pulling the user id and password from the registry is one of two things: 1. Use integrated security and impersonate a Windows user; 2. Secure your config file using the method described here:
Encrypting Configuration Information Using Protected Configuration[^]
|
|
|
|
|
Thank you.
I was looking over that solution.
Since I am using TableAdapter to fill the tables, etc.. I can set, get the string from the property on the adapter, I will just append the password to the end of the string, and will use it like that.
Thank you again
|
|
|
|
|
Hi,
I am working on a multhread application. App uses unmanaged dlls. Program runs some period of time normally. After GC works at specific point fullness of memory, program crashes. I got "First-chance exception at 0x008f7b3c in GML.exe: 0xC0000005: Access violation reading location 0x00000000 in mscorwks.dll" error . Searched for solution several forums. Similar problems with diffrent symptoms is mentioned, but recomendations walk around. How to solve this problem.
Thanks
asbasir
|
|
|
|
|
are you creating buffers, etc that are passed to the unmanaged code on the managed end? IF so, you need to decalre them as fixed so they don't get moved by the GC. If that happens the unmanaged code will try accessing a bad memory address and get an acess violation.
|
|
|
|
|
Hello,
thanks for your response.
I have fixed all unmanaged string pointers.
During debugging, mscorwks.dll appears with an exclamation sign on the modules windows. Do you think this is related with problem?
good day.
asbasir
|
|
|
|
|
asbasir wrote: "First-chance exception
First change exceptions are not caught yet, you can safely ignore them, unless they get unhandled. Then another message will be display.
|
|
|
|
|
Which is the best way to check if a function is running or not.
I have a function of type void. it's called between 2 threads. i wanna make sure that the other thread is finished with it before my main thread use that same function.
Donkaiser
|
|
|
|
|
Use the lock keyword around the code you want to protect. You need a reference variable (e.g. an object) in your class to identify the lock.
lock (myObject) {
// code in here is only run by one thread at a time.
}
---
b { font-weight: normal; }
|
|
|
|
|
Hello everyone,
I need to write a DCOM server object in C#. Is this possible? Can I just write a C# Remoting object and then expose this as a COM object, or will this not work because the object needs to be accessed remotely?
Any help would be greatly appreciated!
Thanks,
Shehzad
|
|
|
|
|
I need to draw a rounded rectangle.
I think I create the points and fill that in.
Can anyone tell me if thats so, and what method fill fill an object created from points.
Thanks,
Nick
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
|
thats cool. but it doesnt make them rounded.
Can I create a clip region based on 4 lines and 4 curves? ( a rounded rectangle drawn piece by piece )
The problem is that doesn't draw curves.
Nevermind. I figured it out with GraphicsPath.
Thanks tho
Nick
1 line of code equals many bugs. So don't write any!!
-- modified at 12:04 Friday 26th May, 2006
|
|
|
|
|
hi all,
is there something important to do that i dont know when inserting password fields into database ?
i have a password textbox on my form and have a masked field on database.
look at this :
string query = "insert into users(username,password,status,logintime,lastlogintime) values('" + txtuser.Text + "' , '" + txtpassword.Text + "' , '" + cmbstatus.Text + "','" + lblLoginTime.Text + "','" + lblLoginTime.Text + "')"; gives insert into error.
but this :
string query = "insert into users(username,status,logintime,lastlogintime) values('" + txtuser.Text + "' , '" + cmbstatus.Text + "','" + lblLoginTime.Text + "','" + lblLoginTime.Text + "')";
doesnt give an error ;( [password field removed when inserting data to database.]
so i dont know why that masked password field causes an error when inserting data ?
help please ...
thanks in advance,
bye.
|
|
|
|
|
Password word is keyword in SQL too and probably this is the problem. but make google-ing and sure u gonna understand reason.
|
|
|
|
|
I have my static RegistryAccess class which reads and sets values in the registry. I want to be able to set/get the value that contains the space (Default) in the registry. However if I access it with key="(Default)" it creates another registry entry with that key value instead of accessing the default registry key.
(In otherwords this is what I see in regedit:
(Default) REG_SZ (value not set)
(Default) REG_SZ true
Do I access it with key = string.Empty ???
Thanks.
|
|
|
|
|
How can i make my program to loop for .5 second before moving on to next line of code.
Is it the same as using Thread.Sleep(500)?
Yes, it's running on a thread but i don't know doing that how it's gonna affect other threads.
Appreciate
Donkaiser
|
|
|
|