🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #9768

Re: problems with GetCurrentThreadId(), GetWindowThreadProcessId()...

#9768
From: Oren Halvani
Date: Tue, 15 Jun 2004 01:02
74 lines
3627 bytes
hi dear Gambit,

it's 3AM in the morning here in frankfurt/germany so please ignore sytax
errors ;-)

"Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com>
 schrieb im Newsbeitrag news:40cd3589@newsgroups.borland.com...
>
> You should use CreateProcess() instead of ShellExecute() when running
> executables directly.

OK...I'll change it to CreateProcess()

> Did you write PCRE.exe yourself?

Jes..

> 1) rather than trying to send the text to the active window of PCRE, you
> should use WM_COPYDATA to send the text to PCRE's main window directly,
and
> then let it decide where to put the received text regardless of the focus.

Remy, thats what I trying to avoid..i don't want to make it so complicated..
But OK, even when I use WM_COPYDATA, how do i fill the LPARAM structure...?

// Win 32 SDK says...

typedef struct tagCOPYDATASTRUCT
{
    DWORD dwData; // Specifies up to 32 bits of data to be passed to the
receiving application...
    DWORD cbData; // Specifies the size, in bytes, of the data pointed to by
the lpData member.
    PVOID lpData;
} COPYDATASTRUCT;

// dwDate = "MyTextfile.txt" ???
// cbData = FileSize("MyTextfile.txt") ???

so when I want to open the textfile that the main application has created,
i'm passing the filename as the first parameter to "PCRE.exe"

SendMessage(hWnd, WM_COPYDATA, 0, ???LPARAM???);

> 2) save the text to a temporary file and then simply pass the filename to
> PCRE, such as a command line argument.  Then PCRE can load the file at its
> leisure and you don't have to use window messages at all.

no problem ! but again how do i setup WM_COPYDATA for doing this...?

sorry..i realy don't understand the WM_COPYDATA..

> Why are you even using a separate executable to begin with?  What is PCRE
> doing that your main application can't simply do itself directly?  Please
> explain.

OK I explain...it extracts strings with reg expressions and sends them back
to my
main application for doing more several operations..

PCRE is written under BCB 6, that supports as the name say
"Perl Compatible Regular Expressions"...My Main application (written in BCB
3)
doesn't have it..

i gave it up to use third-party PCRE libaries, no one of them has worked
well ! also i tryed many, many, many times to install various components
with Reg Expression Support, but I never could install them.. (the compiler)
couldn NOT install them..and using/including the PCRE header from BCB 6
into BCB 3 is absolutly NOT possible...so i choosed this cheesy solution..

..i going to sleep now..sorry i'm damn tired :-)

Oren,.
Technical Details
Message-ID: <40ce4a4b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40cd0458$1@newsgroups.borland.com> <40cd3589@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,288e4db03c5a16db
X-Google-Attributes: gid10cc67,public
Reply-To: "Oren Halvani" <NoSpam@fdtd.com>
From: "Oren Halvani" <NoSpam@fdtd.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <40cd0458$1@newsgroups.borland.com> <40cd3589@newsgroups.borland.com>
Subject: Re: problems with GetCurrentThreadId(), GetWindowThreadProcessId()...
Date: Tue, 15 Jun 2004 03:02:07 +0200
Lines: 76
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 217.234.104.3
Message-ID: <40ce4a4b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1087261259 217.234.104.3 (14 Jun 2004 18:00:59 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail