comp.os.mswindows.programmer.win32
  Home FAQ Contact Sign in
comp.os.mswindows.programmer.win32 only
 
Advanced search
May 2008
motuwethfrsasuw
   1234 18
567891011 19
12131415161718 20
19202122232425 21
262728293031  22
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
  LookupAccountName & runas         


Author: JG
Date: May 19, 2008 23:41

Hi,
I have a program which calls LookupAccountName for a AD user in
the following format - DomainName\UserName.

LookupAccountName fails with the following error

1789 is ERROR_TRUSTED_RELATIONSHIP_FAILURE in the Windows SDK -
"The trust relationship between this workstation and the primary domain
failed."

Now, I run the following from the command line
runas /user:domainname\username cmd.exe

It successfully opens a cmd window as the user.

After this I run my program again, the same LookupAccountName call succeeds.

Any ideas, how something like this could happen?
6 Comments
  draw a line in a static control         


Author: David
Date: May 19, 2008 21:01

Hi,

I am trying to write a line in a static control. but there is no line.
I am appreciated if you can help me.

BOOL CALLBACK MainDlg::DlgProc(HWND hwndDlg, UINT message, WPARAM
wParam, LPARAM lParam)
{
HWND hwndStatic;
RECT rect;

hwndStatic=GetDlgItem(hwndDlg,IDC_PICTURE);
GetWindowRect(hwndStatic,&rect);
switch(message)
{
case WM_PAINT:
{
hdc=GetDC(hwndDlg);
MoveToEx(hdc,(int)rect.left+10,(int)rect.top,(LPPOINT)NULL);
LineTo(hdc,(int)rect.left+200,(int)rect.top+200);
Show full article (0.67Kb)
2 Comments
  Are WPARAM and LPARAM 64 bits in Vista?         


Author: Larry Lindstrom
Date: May 19, 2008 20:18

Hi Folks:

I don't have Vista yet, but I'm curious.

Will I be able to pass 64 bit values with one argument
to SendMessage() and PostMessage() in Vista? All versions?

What do folks think of Vista? All I know is what I see
in the Mac commercials.

Thanks
Larry
1 Comment
  Memory Issues in RPC         


Author: alien.0101
Date: May 19, 2008 18:12

Hi Guys,

I am creating a client server program using RPC.

I have Server API in IDL as:

IDL:

HRESULT GetBlob([out] DWORD *pdwBlobByteCount,[out,
size_is(,*pdwBlobByteCount)] BYTE** ppBlob);

This function returns an array of byte and byte count as output
params.

Now as required by RPC I need to implement memory functions on both
client and server.

midl_user_allocate(..)
midl_user_free(..)

Lets look at client code:
Show full article (1.63Kb)
1 Comment
  How to do synchronous functions in Win32         


Author: Angus
Date: May 19, 2008 13:46

Hello

I need to wait for a response (from the network) to receive data for a
function call. I have developed an API which has a function eg
GetStockCountFromServer(long* stockcount) [or GetStockCountFromServer(long&
stockcount)]

I can use the WIN32 wait functions to wait for a response but how do I
populate the stockcount variable? Do I have to use global or member values?

The function receiving the data from the network is different to function
used in API - so my question really is how to marry them up?

Angus
1 Comment
  _check_range_exit         


Author: John Keenan
Date: May 19, 2008 12:05

An application of mine is generating a floating overflow. However the stack
shows:

KERNEL32! 7c59bcb1
MSVCRTD! _raise_exe
MSVCRTD! _87except
MSVCRTD! _startOneArgErrorHandling
MSVCRTD! _check_range_exit
myCpp::method

myCpp::method calls methods that perform floating point operations but does
not do any itself. Under Debug > exceptions... I have selected "stop always"
for everything. But with both debug and release version the stack is not
showing the location of the exception. I do not find any mention of this on
google or groups.google. What exactly is this stack telling me? How do I get
the point of the exception to appear in the debugger?

John
1 Comment
  run external programm in an directory which is spezified in $PATH         


Author: Andi K
Date: May 19, 2008 10:02

hi

i'm looking for a function to call an external application. - i don't
know the directory of the application, but the directory is spezified in
the $PATH variable. i'm developing in c++ in visual studio 2005.

i hope you can help me

thank you
andreas kasper
5 Comments
  detecting mouse cursrsor change message         


Author: vidishasharma
Date: May 19, 2008 06:00

Hi,

I want to detect change of mouse cursor. Wne an hyperlink is
rightclicked the cursor changes to hand. How do I detect that. I do
the following however it never goes in ((int)SystemIcons.IDI_HAND

value of IDI_HAND is as follows : public const int IDI_HAND =
32513,

private IntPtr ReadingPaneProc(IntPtr hWnd, int msg, IntPtr
wParam, IntPtr lParam)
{
System.Windows.Forms.Message m =
System.Windows.Forms.Message.Create(hWnd, msg, wParam,
lParam);
switch (m.Msg)
{
case WM_SETCURSOR:
Show full article (1.15Kb)
1 Comment
  Dumbest Question of the Day - 120 Lines of Code - 110 Lines of .rc - 18 Lines of Resource.h         


Author: larryl_turbo
Date: May 19, 2008 03:54

Hi Folks:

Developing on XP Home, VS 2008 Pro, C++, WIN32, no MFC.

This is embarrassing. I seem to have lost the ability to write a
simple
app with a pop up child.

When the child dialog is terminated, the parent has no focus, and
is disabled. Isn't Windows supposed to return focus to the parent
and enable it after a modal child terminates?

I have added code to test for the parent being disabled when
returning from the child and enabling the parent if needed. If
uncommented this seems to work, but I've never needed to do this
before, and it seems to fail when children spin off children of their
own.

So, what incredibly stupid thing am I doing, and not seeing?

Thanks to anyone who takes the time to look at this code.
Show full article (7.77Kb)
3 Comments
  How to know if window is switched?         


Author: adityar7
Date: May 19, 2008 03:13

Is it possible to know if the user switched the active window to
another program? In particular, by clicking on another open
application on the task bar. I'm writing a program for an experiment
in which we need to note the time if the user switches the active
window, and I'm not sure if this is possible.

Any help would be appreciated!

Thanks,

Aditya
4 Comments