Jump to content

craziscoth

Member
  • Posts

    27
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Everything posted by craziscoth

  1. I matched up the RAM with what the mobo manufacturer listed as supported memory. As I said I tried both sticks at the same time in channel 0, then in channel 1. I tried 1 stick in each socket to see if it was a socket problem, then tried the other to make sure it wasn't the stick of RAM. Then I tried it without any memory. The motherboard never beeped at me. I verified all the necessary cables are plugged in properly. I actually found out that what I thought were diagnostic lights on the mobo are actually meant to indicate CPU load. So according to the mobo the CPU is at max load yet the CPU fan doesn't run and nothing comes up. I actually also tried plugging the CPU fan into another 4-pin fan header on the mobo to see if it works and it does the same thing. All the other fans I have are 3-pin and they work when plugged into the mobo.
  2. I've built and modified many computers in the past, though its been awhile and I decided to build another. I got all the parts and put it together and it didn't startup (not even to the POST) and I am having trouble determining the root cause. I have disconnected/removed pretty much everything except the memory, cpu and cpu fan. I have verified the power supply is fine with a spare power supply I have. I have tried putting the memory modules in different sockets and even tried removing them altogether without making a difference. What I notice is that when I power on the system, the cpu fan starts and stops quickly. Also, six diagnostic lights on the motherboard (2 green, 2 yellow, 2 red) come on and remain on (no blinking). When I power the unit off the cpu fan starts and stops again. Some details about the components. I have a Gigabyte GA-EP35-DS3P motherboard with a retail Intel Core 2 Duo E6750 processor with heatsink and fan. I also have 2x1GB Crucial Ballistix DDR2 RAM that I initially put in socket 0 and 2 (Channel 0). Because I have not built or upgraded a system in a while, I do not have a spare CPU or motherboard to swap out to verify if I just received a bad part. Does anyone have any ideas what might be wrong or how to diagnose the problem further? Thanks,
  3. Anyone have any experience or know a good tutorial on talking to serial devices using EPIC instuctions? I am trying to write an application to talk to an EPIC Serial device over USB and though I seem able to write to the device, I am not able to read anything from it and therefore unsure if I am sending the right commands. Thanks
  4. Don't know if you figured it out yet, but check out MSDN for RegCreateKey and RegDeleteKey. These will work in c++ console applications. You can find this information online at http://msdn2.microsoft.com/en-us/library/ms724842.aspx
  5. That is how the data is stored in the IQuery->Response object, as a SafeArray. If there is a better way to get the data out then I'm open to it. Using C# I know how to get the data out, but that is not an option here. I have to use C++ in Visual Studio 6.0
  6. I am trying to get some data out of a SafeArray using Visual C++ 6.0 and am having some problems. I found an article on microsoft's website (http://support.microsoft.com/kb/167668/EN-US/) to convert a VARIANT type to a SafeArray and then get the upper and lower bounds to iterate through the array getting each element, which is what I want to do. However it throws and unhandled exception (OLEAUT32.DLL): Access Violation. When debugging through my code this exception happens at the line: hr = SafeArrayGetLBound(psa, 1, &lLBound); Here is a larger snippet of surrounding code: SAFEARRAY FAR* psa = NULL; BSTR HUGEP *pbstr; long lLBound, lUBound, cElements; psa = V_ARRAY(&(IQuery->Response)); hr = SafeArrayGetLBound(psa, 1, &lLBound); hr = SafeArrayGetUBound(psa, 1, &lUBound); hr = SafeArrayAccessData(psa, (void HUGEP* FAR*)&pbstr); cElements = lUBound - lLBound + 1; for (long i = 0; i < cElements-1; i++) { ... } Why is this throwing an exception? Is there a better way to get the data out of the safearray than this? Thanks
  7. Thanks. I had already tried all the methods in the first link you provided and none were consistent across all platforms. But the method provided in that MS Article seems to have done the trick.
  8. I have some c++ code using the functions GetIfTable() and GetIfEntry() to retrieve the MAC Address. The problem is it doesn't always get MAC Address, though when I run ipconfig /all from the command line I can see that there is a valid MAC Address in those instances. I would use the GetAdaptersInfo() function except I need the code to run on Windows NT and XP and GetAdaptersInfo doesn't work on NT. Anyone have any suggestions to always be able to get the MAC Address? Thanks.
  9. Hey all, I am trying to call a program from another program. The program I am calling needs to load a driver to run, but I am logged in as a non-admin user. I tried playing around with some local policies and added the Users group to the "Load and unload device drivers" policy but still cannot get the program I am calling to successfully load the driver it needs to run. Any ideas on what permissions or policy I can set to get this program to run under a non-admin? Thanks.
  10. Well, since no one else has responded. I found the problem. I was calling GetStartupInfo(&si) and overwriting the information I had set for redirecting the output.
  11. trying to launch a separate executable and redirect the output to another file for parsing. ive looked in msdn and the sample they give doesn't seem to work with the environment i have. don't know if im missing something. here is the code i have int LaunchProcess(LPTSTR programName, LPTSTR commandLine, BOOL wait_flag, const _TCHAR *curDir = NULL, const _TCHAR *redirOut = NULL) { PROCESS_INFORMATION pi; STARTUPINFO si; DWORD dwExitCode = 0; DWORD dw; DWORD last_error; BOOL fSuccess; BOOL fExit; DWORD create_flags; HANDLE hFileout = NULL; SECURITY_ATTRIBUTES saAttr; int return_status; ZeroMemory(&si, sizeof(STARTUPINFO)); if (redirOut != NULL) { saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); saAttr.bInheritHandle = TRUE; saAttr.lpSecurityDescriptor = NULL; hFileout = CreateFile(redirOut , FILE_WRITE_DATA , FILE_SHARE_WRITE , &saAttr //security attributes , OPEN_ALWAYS , FILE_ATTRIBUTE_NORMAL , NULL); if (!hFileout == INVALID_HANDLE_VALUE) { si.dwFlags = STARTF_USESTDHANDLES; si.hStdOutput = hFileout; si.hStdError = hFileout; } } if( wait_flag ) { create_flags = 0; } else { create_flags = CREATE_NEW_CONSOLE; } // SETUP STARTUP INFORMATION STRUCTURE: si.cb = sizeof(STARTUPINFO); si.lpReserved = NULL; si.lpDesktop = NULL; si.lpTitle = programName; si.cbReserved2 = 0; si.lpReserved2 = NULL; GetStartupInfo( &si ); if( ! wait_flag ) // IF WE DO NOT WAIT - RUN MINIMIZED { si.dwFlags = si.dwFlags | STARTF_USESHOWWINDOW; si.wShowWindow = SW_SHOWMINIMIZED; } fSuccess = CreateProcess( programName, commandLine, (LPSECURITY_ATTRIBUTES) NULL, /* Process security */ (LPSECURITY_ATTRIBUTES) NULL, /* Thread Security */ (BOOL) TRUE, /* Inherit handles */ (DWORD) create_flags, /* Create Flags */ NULL, /* Environment: */ curDir, /* Current Dir */ (LPSTARTUPINFO) &si, /* Startup info */ (LPPROCESS_INFORMATION) π ); /* Process info */ if( fSuccess != 0 ) // SUCCESS IF != 0 { dwExitCode = 0; /* WAIT FOR TASK TO COMPLETE (NO_TIMEOUT): */ if(wait_flag) { dw = WaitForSingleObject(pi.hProcess, INFINITE ); // WAS PROCESS RUN SUCCESSFULLY: fExit = GetExitCodeProcess(pi.hProcess, &dwExitCode ); return_status = dwExitCode; CloseHandle(pi.hThread); CloseHandle(pi.hProcess); pi.hThread = 0; pi.hProcess = 0; } // END WAIT - SAVE THE EXIT CODE FROM PROGRAM } else /* CREATE PROCESS FAILED */ { last_error = GetLastError(); return_status = -1; } if (hFileout) CloseHandle(hFileout); return( return_status ); } the function here is compiled and built into a dll. i dont know if it being in a dll is any cause for it to not work or not. plz help. thanx
  12. I don't have the code anymore as I switched to using SSPI to logon as another user. Check Microsofts site: http://msdn.microsoft.com/library/default....y/logonuser.asp Here is a snipet of code I used to get a handle to another users HKCU registry key: HANDLE hToken = NULL; LogonUser(tName, tDomain, tPassword, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, &hToken); PROFILEINFO pi = {sizeof pi, PI_NOUI, tName}; LoadUserProfile(hToken, π); //registry code here UnloadUserProfile(hToken, pi.hProfile); CloseHandle(hToken); hToken = NULL;
  13. Quick question about NT registry permissions. I need to add permissions to the HKLM\System\CurrentControlSet\ComputerName registry key for a program I am running. I can do this either manually or programmatically. However, when I reboot the computer I lose my permissions to that registry key and don't understand why. This happens to a few other registry keys as well, but doesn't happen on a WinXP system. Does anyone know why this is happening and/or how to fix it so I don't lose the permissions I set upon reboot? Thanks.
  14. I am new to SSPI and find it a bit confusing. I need to login as another user and modify that users CurrentUser registry key. At first I tried using the API LogonUser() followed by LoadProfile. But when compiled in Unicode and run on WindowsNT, LogonUser gives me an exception. If I could figure out why and how to fix it I wouldn't have to use SSPI. So I found some examples of sspi and tried using it myself. I finally got to where I can change the user (or so I think) but can't figure out how to get/do anything with that user's profile. Any ideas?
  15. I am writing a C++ application in which I need to add file permissions for a user. I am using an explicit access structure to add to the DACL. The problem I have is that I want to inherit the permissions for all files created within a folder after I assign the new permissions. I can do this in XP by setting: eb.grfInheritance = SUB_CONTAINERS_AND_OBJECTS_INHERIT; When I run my application in NT however, it doesn't seem to accept this value; in fact it doesn't seem to accept anything other than: eb.grfInheritance = 0; Are there any suggestions on how to get this to work in NT or is it just plain impossible?
  16. Hello all, I am trying to change the security permissions for a file/folder to allow or deny full control to a specific user. However I get an access denied in setting the security info for the following code: hFile = CreateFile(filename, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, NULL); rc = GetSecurityInfo(hFile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, &pDACL, NULL, &pSD); rc = SetEntriesInAcl(1, &eb, pDACL, &pNewDACL); rc = SetSecurityInfo(hFile, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, NULL, NULL, pNewDACL, NULL); I don't get any errors until the SetSecurityInfo call and it returns 'Access is denied'. Any ideas on what I am doing wrong? Thanks.
  17. Hi all, Writing some code that needs to be able to logon as another user to modify some registry keys. I am using the LogonUser() function and it works fine when my code is executed on a WinXP machine, but I also need to support WinNT. When I run the code on WinNT I get an error that I don't have appropriate privileges. I've read some about the SE_TCB_NAME privilege, but how do I get this privilege at runtime? Is there a better way to logon as another user in WinNT? Thanks
  18. Well I decided to use the ATL macros (T2W) and that worked fine. Problem solved.
  19. Hi all, I wrote some c++ code to do some user management using the netapi32 library. I use certain functions such as NetLocalGroupAddMembers that requires the groupname to be a LPCWSTR. The variable I have for the groupname is a TCHAR and I need to convert it to a WCHAR* at runtime but am having some difficulty with it. I was trying to use the MultiByteToWideChar function to get the required size, allocate the appropriate memory and then convert the groupname (group) to a WCHAR* (wGroup). But when calling MultiByteToWideChar the second time during execution, I get an application error. 'The instruction at "0x77f536f7" referenced memory at "0x5c740000". The memory could not be "written". Below is the code in which I try to do this. Can anyone help me to get this working? Thanks. iReqSize = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, (char*)group, -1, wGroup, 0); if ( (wGroup = (WCHAR*)LocalAlloc(LPTR, iReqSize)) == NULL) { _tprintf(_T("\nUnable to add user to administrators group.")); if (bDebug) _tprintf(_T("..Error allocating memory for group name")); LocalFree(wUser); wUser = NULL; return ERROR_SET_GROUP; } if ( (MultiByteToWideChar(CP_ACP, 0, (char*)group, -1, wGroup, iReqSize)) == 0) { _tprintf(_T("\nUnable to add user to administrators group.")); if (bDebug) _tprintf(_T("..Error converting group name to unicode: %d"), GetLastError()); LocalFree(wUser); wUser = NULL; LocalFree(wGroup); wGroup = NULL; return ERROR_SET_GROUP; } NetLocalGroupAddMembers(NULL, wGroup, 3, (LPBYTE) &luser, 1);
  20. Getting a bit disheartened by lack of response. From what I've found out so far, the HKEY_USER key isn't available for users not currently logged on. So it appears as if the SID does me no good here. The best solution I've found is to use the API LogonUser and then LoadUserProfile to load the users HKEY_USER registry key and get a handle to it. However this requires having the user password to do the logon which I do not have. Anyone know of a better solution?
  21. I was looking to do something similar in C++ (get the SID for a user to access the HKEY_USERS registry key). I can't use WMI and it needs to work on Windows NT. Any suggestions? ---Update--- I've gotten the SID using the LookupAccountName function, but am unable to access the HKEY_USERS key for any user other than the one I am currently logged in as. More on what I am trying to do: I am trying to modify the Shell registry key for certain users that may not be currently logged in and not all users on the system. Any ideas?
  22. That loooks like it would work, but then I have to rename the new file overwriting the old file. Is that really the best way to update an existing file? Is there an easy way to rename the new file and overwrite the old file? Thanks.
  23. Hey, I am new to VBScript and need a function to find a specified key in an ini file and update the value. I was looking for something similar to the WritePrivateProfileString which I know how to use in C++ or VB but can't seem to get to work in VBScript. Anyone know how to get it to work with VBScript or just how to update the key value in an ini file once you find it? Thanks
  24. Well I figured this one out using the LoadLibrary() function and checking to see if it was NULL. Seems whenever I post a question to a forum, even though I've spend hours trying to find the answer beforehand, I find the answer elsewhere within an hour or two of my post and before anyone can reply to my post with an answer.
  25. Hi, I have this application I am developing to run on both WinXP Embedded and WinXP Pro and it uses the EWF functionality of WinXP Embedded. When it runs on XPe I need the ewfapi.dll loaded, but when I run on XPpro, it won't run because the dll is not there. Is there a way to keep the dll from trying to load when the app runs on XPpro so that the application will still run without the EWF functionality? Thanks.
×
×
  • Create New...