Click here to Skip to main content
15,887,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Local Variable changes suddenly Pin
Nxsis20-Apr-10 19:38
Nxsis20-Apr-10 19:38 
QuestionRe: Local Variable changes suddenly Pin
David Crow21-Apr-10 2:50
David Crow21-Apr-10 2:50 
AnswerRe: Local Variable changes suddenly Pin
LintMan20-Apr-10 6:18
LintMan20-Apr-10 6:18 
GeneralRe: Local Variable changes suddenly Pin
Nxsis20-Apr-10 19:37
Nxsis20-Apr-10 19:37 
GeneralRe: Local Variable changes suddenly Pin
LintMan21-Apr-10 4:01
LintMan21-Apr-10 4:01 
GeneralRe: Local Variable changes suddenly Pin
Nxsis22-Apr-10 2:37
Nxsis22-Apr-10 2:37 
GeneralRe: Local Variable changes suddenly Pin
LintMan23-Apr-10 6:50
LintMan23-Apr-10 6:50 
QuestionWindows 7 + Mailslot [solved] Pin
Member 138094720-Apr-10 2:46
Member 138094720-Apr-10 2:46 
Hi,

please allow me to post a specific question here.

We have an application that consists of the exe and a service. This code is running on Win2k currently.

We have the job to migrate this code to Win7. The software is currently running as an adminsitrator (app and service). They should run on the account of a local(restricted) user.

The problem: the software uses mailslots for the communication between the app and the service. This works when both parts are started as administrator on Win7. It will not work when they both are started as a local user and not when the app is started on the account of a local user and the service as administrator.

In the error-case the function CreateFile() returns an INVALID_HANDLE_VALUE and GetLastError() returns a value of 5 (== ERROR_ACCESS_DENIED).

Whats wrong in our code?
Thanks.
August

PS: a link will be sufficient.

here is our code for creating the mailslot:
  HANDLE mailSlotHandle =
      CreateFile( GetClientMailslotName(),
              GENERIC_WRITE,
          FILE_SHARE_READ | FILE_SHARE_WRITE,
          NULL,
              OPEN_EXISTING,
              FILE_ATTRIBUTE_NORMAL | FILE_FLAG_WRITE_THROUGH ,
          NULL);
if( mailSlotHandle == INVALID_HANDLE_VALUE )
{
    DWORD errorNumber = GetLastError();
and so on.
modified on Wednesday, April 21, 2010 5:32 AM

AnswerRe: Windows 7 + Mailslot Pin
Michel Godfroid20-Apr-10 3:31
Michel Godfroid20-Apr-10 3:31 
GeneralRe: Windows 7 + Mailslot Pin
Member 138094720-Apr-10 3:47
Member 138094720-Apr-10 3:47 
GeneralRe: Windows 7 + Mailslot Pin
Michel Godfroid20-Apr-10 5:06
Michel Godfroid20-Apr-10 5:06 
GeneralRe: Windows 7 + Mailslot Pin
Member 138094720-Apr-10 23:32
Member 138094720-Apr-10 23:32 
GeneralRe: Windows 7 + Mailslot Pin
BW0228-Mar-11 11:47
BW0228-Mar-11 11:47 
GeneralRe: Windows 7 + Mailslot Pin
Member 138094713-Mar-11 2:49
Member 138094713-Mar-11 2:49 
GeneralRe: Windows 7 + Mailslot Pin
Member 138094713-Mar-11 2:59
Member 138094713-Mar-11 2:59 
QuestionRun Sample program in mingw with msys [modified] Pin
Game-point20-Apr-10 1:53
Game-point20-Apr-10 1:53 
AnswerRe: Run Sample program in mingw with msys Pin
CPallini20-Apr-10 2:37
mveCPallini20-Apr-10 2:37 
QuestionCatch 'Print' button click event of print dialog from MFC application Pin
Rahul B S20-Apr-10 1:26
Rahul B S20-Apr-10 1:26 
QuestionRe: Catch 'Print' button click event of print dialog from MFC application Pin
David Crow20-Apr-10 2:54
David Crow20-Apr-10 2:54 
AnswerRe: Catch 'Print' button click event of print dialog from MFC application Pin
Rahul B S20-Apr-10 3:51
Rahul B S20-Apr-10 3:51 
QuestionRe: Catch 'Print' button click event of print dialog from MFC application Pin
David Crow20-Apr-10 4:04
David Crow20-Apr-10 4:04 
AnswerRe: Catch 'Print' button click event of print dialog from MFC application Pin
Rahul B S20-Apr-10 4:15
Rahul B S20-Apr-10 4:15 
GeneralRe: Catch 'Print' button click event of print dialog from MFC application Pin
David Crow20-Apr-10 4:40
David Crow20-Apr-10 4:40 
GeneralRe: Catch 'Print' button click event of print dialog from MFC application Pin
Rahul B S20-Apr-10 16:28
Rahul B S20-Apr-10 16:28 
GeneralRe: Catch 'Print' button click event of print dialog from MFC application Pin
David Crow21-Apr-10 2:54
David Crow21-Apr-10 2:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.