16,004,686 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by chiselca (Top 4 by date)
chiselca
27-Sep-12 10:41am
View
Yes it works as a regular user in XP, Win7 32 bit and Win7 64 bit, that was a requirement. I wish I could help you more. I will tell you that I never had a problem that frustrated me so much. I fought it for weeks and was very close to giving up and redesigning my app when I figured out the MessageBox issue. My advice would be, keep plugging away. It works. It's very easy to convince yourself that it works for everyone but you. It doesn't. It works for everybody if you do everything right. You're probably missing something simple.
chiselca
27-Sep-12 8:57am
View
It's been 2 years but I remember that my main problem was I had MessageBox calls that were executing and stopping the thread before the code that sets up the file mapping even ran. You can't use MessageBox calls in the process that is running in Session 0 because the user will not see them and therefore cannot dismiss them, so they pause the thread forever. Other than that I followed the advice on this forum thread and got it working. Here is some of my code, hope it helps:
// Attempt to create a named file mapping object.
hMapObject = CreateFileMapping(
(HANDLE) 0xFFFFFFFF, // use paging file
&sa, // specific security attributes
PAGE_READWRITE, // read/write access
0, // size: high 32-bits
sizeof(TsharedMem), // size: low 32-bits
"Global\\MyFileMap"); // name of map object
sa is defined as --
TCHAR * szSD = TEXT("D:") // Discretionary ACL
TEXT("(D;OICI;GA;;;BG)") // Deny access to built-in guests
TEXT("(A;OICI;GA;;;BA)") // Allow SDDL_GENERIC_ALL (GA) to administrators (BA)
TEXT("(A;OICI;FA;;;BU)"); // Allow FILE_ALL_ACCESS (FA) to built-in Users (BU)
ConvertStringSecurityDescriptorToSecurityDescriptor(
szSD,
SDDL_REVISION_1,
&(sa->lpSecurityDescriptor),
NULL);
chiselca
16-Nov-10 6:58am
View
On the 64 bit machine I am watching my service's registry keys under the "WOW6432Node". They don't update until the service is stopped. Likewise, on the 32 bit VM I monitor my keys under "HKLM\Software" and they also do not update until the service is stopped. Where else could the service possibly be writing to? On Windows XP the registry keys are updated immediately while the service is running. Also, with regards to 'Reflection', from what I have read Reflection is disabled in Windows 7.
chiselca
15-Nov-10 14:37pm
View
Dave, Yes, it IS a 32 bit app, but see my further explanations below regarding 32 bit and 64 bit Windows. And yes, I am aware, but only recently, about the Wow6432Node registry key. On my x64 machine that node is not getting updated until the service is stopped.