|
Recently, I have developped a system on a network environment (Pc <--> PDA) that makes data transfere between these endpoints using WEBSERVICE mechanism. Unforunatley I have to cancel the way of WebService, cause of rarely-arising but undefined and unbearable slow-down of the communication.
So I am planing to migrate my system to Socket mechanism. At the first look at Socket class, I see that it seems impossible to pass objects of my own-defined classes that represents the data structure. It seems no way to send/receive "Object" using nor Socket methods, neihter Streams via NetworkStream class. and I see that data transmission is completely based on "bytes" and "bytes & char arrays"..
Or Am I wrong ?. (I hope so)
What can I do? I just dont want to struggle with bytes. Instead using my existing classes, I just send my objects that includes only standart data types (int, bool, string)
Thanks to all
|
|
|
|
|
I've got an installshield package that is installing a c++ dll. It used to be set to selfregister but for various reasons we now need to register this file at the end of the install.
If i call
LaunchAppAndWait(SUPPORTDIR ^ "regsvr32", WINSYSDIR ^ "mydll.dll", WAIT);
i get a loadlibrary failed error. While the error is on screen i open a command window and run "regsvr32 mydll.dll" and the registration succeeds.
So i thought maybe the path i'm giving it is wrong although the line above it registers a component in the samefolder and i've used the same format of command. So i run this:
if(FindFile(WINSYSDIR , "mydll.dll",szSDKFileName)=0) then
LaunchAppAndWait(SUPPORTDIR ^ "regsvr32", WINSYSDIR ^ szSDKFileName, WAIT);
else
MessageBox("Not found",SEVERE);
endif;
This code still fails with the LoadError Message and registration from the command line still succeeds at this point.
Any Ideas?
Russell
|
|
|
|
|
If this is C# related, then I have been coding in a completely different language for 7 years!
|
|
|
|
|
What does this have to do with C#? Shouldn't you be asking this in an Install Shield forum?
led mike
|
|
|
|
|
Granted it has nothing to do with c# except that most of the project is written in c#.
I know that several people in here use InstallShield and might know an answer and I have no idea where i might go to ask about installshield as all the forum postings i've looked at on the accresso forums have been left unanswered.
Maybe we need a codeproject Installation pain section?
Russell
|
|
|
|
|
Russell Jones wrote: i've looked at on the accresso forums
What's accresso?
Russell Jones wrote: Maybe we need a codeproject Installation pain section?
I would think the "General Discussions" forum would have been a better choice than C# for this subject.
led mike
|
|
|
|
|
led mike wrote:
I would think the "General Discussions" forum would have been a better choice than C# for this subject.
In all the years I've been using CodeProject, I never realised there was a general discussion forum. That would be a much better place to put a question like this.
Doh
Russell
|
|
|
|
|
I want to add new node in existing treeview control and after that I wanna bind data from table to this node dynamically.
I m using c#.net
|
|
|
|
|
I am trying to insert a record into an Access 2007 DB. I am having an issue with a Memo field. I have tried double quotes, single quotes. I am at a loss on how to load this sentence: This is a Test
If anybody has any ideas or sample code I would really appreciate.
|
|
|
|
|
Have you looked at the Samples that come with Access? Have you looked for information on the Access Developer site[^]?
led mike
|
|
|
|
|
Do they examples of doing this using C#?
|
|
|
|
|
kruegersck wrote: Do they examples of doing this using C#?
kruegersck wrote: I still get an error on my Insert Command stating: Syntax error in INSERT INTO statement.
If you have any intention of becoming a capable software developer I suggest you stop typing questions into forums and start researching and reading your own information. It is as valuable a skill and activity of a developer as any other, period.
led mike
|
|
|
|
|
An insert query for that is rather simple. Example:
insert into someTable (aMemoField) values ('This is a test...')
When you do it from code you should use a parameterised query, though. Then you don't have to worry about apostrophes and correctly escaping strings (which is rather crucial to protect against SQL injection attacks).
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Here is my updated Code utlizing a parameterised query. I still get an error on my Insert Command stating: Syntax error in INSERT INTO statement.
The first field is a key and is a long int
The second field is a Text Field 255 long
Here is the code that does the insert. Please let me know of any issues. I can't find any:
string commandText = "INSERT INTO Contact_Notes (Contact_ID,Note) VALUES(@Contact_ID,@Note)";
string strConcat = "**** " + g_ProfName + " " + DateTime.Now.ToString() + " **** " + txtNewNote.Text;
conProspect.Open();
OleDbCommand cmd = new OleDbCommand(commandText,conProspect);
cmd.Parameters.Add("@Contact_ID", lngContactId);
cmd.Parameters.Add("@Note", strConcat);
cmd.ExecuteNonQuery();
conProspect.Close();
cmd.Dispose();
As always thanks for all the help
|
|
|
|
|
If I remove the Note field. It works just fine...
|
|
|
|
|
Note is a reserved keyword in the JET database driver. Change the name of the field, or if that is not practically possible, put brackets around the name in the query: [Note] .
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
any way how I can do that?? I want to convert html to pdf, what is the way to do this. How should I start? Thx ahead
|
|
|
|
|
There are only two options that I'm aware of... The first is to get one of the open source PDF APIs, build your own HTML parser, and with those two in hand build a converter yourself. Option two is buy a package that does it for you. There are a few out there, though it's not really easy to get past the specialty acts and find a tool that does just that. I have used ExpertPDF[^] and it's a decent product, and not too expensive. Good luck.
Visit BoneSoft.com for code generation tools (XML & XSD -> C#, VB, etc...) and some free developer tools as well.
|
|
|
|
|
You can always install a pdf printer driver such as doPDF.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
I have a client / server system which uses sockets to send a receive messages. The messages are then processed on the server and a response sent back. This all works as expected most of the time but in the case of one particular message, it requires an arbitrary amount of data to follow it so I attach a NetworkStream to the Socket (specifying false to 'ownsSocket' so as not to close the socket early). Now this also works fine but some time after using the NetworkStream I get a message received twice in a single Receive call. The client has not sent it twice but it was received twice. This may happen for the message after I use the NetworkStream or after 100 successful messages after, there seems to be no pattern to it.
Now this also seems to happen less and less the more debug messages I add to the application making it very hard to find the problem.
The NetworkStream is closed and disposes after use.
Does anyone have any idea what could be causing this? Could it just be coincidence that it seems to only happen after I use a NetworkStream?
|
|
|
|
|
__DanC__ wrote: The NetworkStream is closed and disposes after use.
Try without closing the NetworkStream.
|
|
|
|
|
Just tried that but it didn't make any difference.
|
|
|
|
|
Client maybe closing the connection?
|
|
|
|
|
Hello,
I use hotkey for activate my form with the NotifyIcon.
It work but i still want to send the HotKey to the current activated application also.
I use '²' key on my french keyboard (only akey simultanous).
code:
protected override void WndProc(ref Message m){
base.WndProc(ref m);
if (m.Msg == WM_HOTKEY){
if (contextMenuStrip_fenetre.Visible)
{
this.ferme_fenetre();
}
else
{
this.affiche_fenetre();
}
}
}
public void RegisterGlobalHotKey(Keys hotkey, int modifiers)
{
String atomName = AppDomain.GetCurrentThreadId().ToString("X8");
GlobalAddAtom(atomName);
RegisterHotKey(this.Handle, hotKeyId, modifiers, (int)hotkey);
modified on Tuesday, July 1, 2008 2:35 PM
|
|
|
|
|