comp.os.mswindows.programmer.win32
  Home FAQ Contact Sign in
comp.os.mswindows.programmer.win32 only
 
Advanced search
January 2008
motuwethfrsasuw
 123456 1
78910111213 2
14151617181920 3
21222324252627 4
28293031    5
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007    
total
comp.os ... win32 Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Detecting >=3 byte sequences in Unicode/UTF-8         


Author:
Date: Jan 23, 2008 17:16

I know this is not really very on-topic for either of these groups,
but searching Google for a newsgroup dedicated to unicode or
encoding-specific groups, I didn't come up with anything ... hopefully
somebody else will have wrestled with this ...

I am parsing data which can contain UTF-8 sequences. The data is
encoded like this:

Sigur%%20R%%C3%%B3s

This represents "Sigur Rós". The second to last letter is supposed to
be this:

http://www.fileformat.info/info/unicode/char/00f3/index.htm

in case that doesn't come through correctly on your end.

So that makes sense, 0xC3 0xB3 is the correct encoding for the weird
o, "o with acute". So far, so good.

But then I realized I could have sequences like

%%C3%%B3%%20

Which would be "o with acute" followed by a space, and I don't know
how to know when to stop.

If I understand UTF-8 encoding right, I can use this logic:
Show full article (1.49Kb)
2 Comments
  code that loads the address of a dll function         


Author: waltbrad
Date: Jan 23, 2008 12:51

Hopefully I'm putting the relevant bits of code here. This code uses
GetProcAddress to get commands "in process" to a server. Now,
GetProcAddress is defined as:

FARPROC GetProcAddress (
HMODULE hModule,
LPCSTR lpProcName)

What FARPROC is exactly is beyond me. The author only says "FARPROC,
like "long pointer," is an anachronism."

I've looked elsewhere with equally confusing results. My best guess is
that it is a function pointer that returns an integer.

Now, the author gives this declaration:

int (*dl_addr) (char *, char*);

This is a function pointer that takes two pointers to char and returns
an integer.

Now as you get into the code you come to this:

dl_addr = (int ( * ) (char *, char *) ) GetProcAddress (pThArg -
>dlhandle, sys_command);
Show full article (1.09Kb)
1 Comment
  Suspend all other threads         


Author: Jens Lenge
Date: Jan 23, 2008 11:41

Hello world,

I am looking for a simple way to have a C++ function suspend all other
active threads of the process (except the one that called the function).

I think I'll need to
a) find and enumerate all active threads of the current process,
b) identify which is the one that called my function,
c) suspend all others one by one.
Or is there a better approach?

However, I couldn't google any guide to this kind of task.
I'd appreciate if somebody can give me some hints on how to do it.

Regards,
Jens
5 Comments
  Recording Key and Mouse Events for Playback During Debugging?         


Author: Larry Lindstrom
Date: Jan 23, 2008 10:41

Hi Folks:

Developing on XP Media, VC6, WIN32, no MFC.

I didn't find much when I queried Google's archives for
this group.

Is there a tool or technique for recording keystrokes so
they can be replayed during a debugging session?

I'm building my first MDI app. Much works, but when I
do get it to fail it's hard to remember exactly what I did
to cause that problem.

Thanks
Larry
1 Comment