Article View: borland.public.cppbuilder.nativeapi
Article #5751Re: problem with processes and pipes
From: Remy Lebeau (TeamB)
Date: Mon, 11 Jul 2005 07:23
Date: Mon, 11 Jul 2005 07:23
34 lines
1973 bytes
1973 bytes
"Serkan οΏ½zkan" <serkan@insaat.org> wrote in message
news:42d0c32b$1@newsgroups.borland.com...
> My problem is; if I execute "dir" as command everything works fine.
> But for example if I execute a net command like "new view" I get
> access violation errors or I get various code guard messages like
> reference to freed memory, invalid memory location etc while trying
> to send the data to the server.
Please show your actual code.
> how should I send unicode data using sockets? send accepts char*
> but not wchar_t*.
Actually, send() accepts any memory buffer as-is. It just needs to be
casted to char* when passed to send(). For example:
wchar_t buf[1024];
// fill buf, then...
send(s, (char*)buf, sizeof(buf)*sizeof(wchar_t), 0);
> Should I convert it using WideCharToMultiByte
No.
> By the way I know I should send a simplified version of the code
> but I could not create a simplified piece of code that creates the
> same errors
Then it is going to be very difficult to diagnose your problem.
Gambit
Technical Details
Message-ID:
<42d21e89$3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42d0c32b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,94749c832783b174 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <42d0c32b$1@newsgroups.borland.com> Subject: Re: problem with processes and pipes Date: Mon, 11 Jul 2005 00:23:29 -0700 Lines: 36 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <42d21e89$3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1121066633 68.69.17.41 (11 Jul 2005 00:23:53 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail