Advertisement

06.04.2008 at 09:04AM PDT, ID: 23457244
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

How To Determine the Windows Messaging Subsystem Default In Windows XP

Asked by facithelpdesk in Windows Programming, FoxPro Database, Windows XP Operating System

Tags: , , ,

We have an in-house developed program that we use for doing timesheets electronically that sends an email to the persons supervisor once the person clicks on the "Send to Supervisor" button in the program.  This was all working when we were using our usernames that were of the first initial and the first seven letters of their last name.  We recently had to change our user names and they are now varied, from just the last name, to first initial middle initial first six characters of the last name, to things like tfb42.  Our programmer has made a table that does a lookup on the names so it opens the right information for the user, but the part for sending out the email is broken.  I found a "solution" on the Microsoft website, http://support.microsoft.com/kb/195850, but it is only for NT and 9x systems.  I can't seem to find anything for an XP system.  Anyone have any ideas?  The coding that is in the MS knowledgebase is pretty much identical to what we have in our code.  Any ideas how we get the current username to be used in the email portion?  I've copied the code from the MS website below.  Our error message is always the "Windows Messaging Key Not Present".  Thanks for any assistance.

MikeStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
#DEFINE HKey_CURRENT_USER 2147483649
   DECLARE INTEGER RegCloseKey IN Win32API ;
      INTEGER nHKey
   DECLARE INTEGER RegOpenKey IN Win32API ;
      INTEGER nHKey, STRING @cSubKey, INTEGER @nResult
   DECLARE RegEnumValue IN ADVAPI32 INTEGER nKeyHandle, INTEGER iValue, ;
      STRING @cValueName, INTEGER @iValueLen, INTEGER, STRING @cTypeCode, ;
      STRING @cDataValue, INTEGER @iDataLen
 
   nSubKey = 0
   nErrCode = 0
   nKeyHandle = 0
   iValue = 0
   cValueName = SPACE(255)
   iValueLen = 255
   cTypeCode = SPACE(255)
   cDataValue = SPACE(255)
   iDataLen = 255
 
   *!* Determine what operating system you are on: Windows NT or
   *!* Windows 9x.
   IF "NT" $ OS(1)
      ckey = "Software\Microsoft\Windows NT\CurrentVersion\" + ;
         "Windows Messaging Subsystem\Profiles"
   ELSE
      ckey = "Software\Microsoft\Windows Messaging Subsystem\Profiles"
   ENDIF
 
   nErrCode = RegOpenKey(HKey_CURRENT_USER,ckey,@nKeyHandle)
   *!* If nErrCode <> 0, Windows messaging is probably not installed.
   IF nErrCode # 0
      WAIT WINDOW "Windows Messaging Key Not Present"
      RETURN nErrCode
   ENDIF
 
   RegEnumValue(nKeyHandle,0,@cValueName,@iValueLen,0,;
      @cTypeCode, @cDataValue, @iDataLen)
   *!* If cDataValue is blank, no profiles have been set up.
   IF EMPTY(cDataValue)
      WAIT WINDOW "No Windows Messaging Profiles Set"
      RETURN
   ELSE
      ? LEFT(cDataValue, iDataLen-1)
   ENDIF
   RegCloseKey(nKeyHandle)
 
Loading Advertisement...
 
[+][-]06.04.2008 at 10:10AM PDT, ID: 21712040

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Windows Programming, FoxPro Database, Windows XP Operating System
Tags: Microsoft, Visual Fox Pro, Windows XP, How To Determine the Windows Messaging Subsystem Default In Windows XP
Sign Up Now!
Solution Provided By: CarlWarner
Participating Experts: 2
Solution Grade: B
 
 
[+][-]06.04.2008 at 11:02AM PDT, ID: 21712438

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 14-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43 / EE_QW_2_20070628