just a spelling error! 'seach' instead of 'search' gotta love that!
esapp420
Posts
-
ADO Binding (compile errors) -
ADO Binding (compile errors)Hello, I have a strange problem with binding using the macro
BEGIN_ADO_BINDING(CCustomRS)
. Here is my code://SearchCustRS.h
//
//
#define INITGUID
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" rename_namespace("ADOCG") rename ("EOF", "EndOfFile")
using namespace ADOCG;
#include "icrsint.h"class CSeachCustRS : public CADORecordBinding
{
BEGIN_ADO_BINDING(CSearchCustRS)
ADO_FIXED_LENGTH_ENTRY(1, adInteger, m_lCustomerID, lCustomerIDS, FALSE)
ADO_VARIABLE_LENGTH_ENTRY2(2, adVarChar, m_szCompName, sizeof(m_szCompName), lCompNameS, TRUE)
..
..
END_ADO_BINDING()
public:
LONG m_lCustomerID;
ULONG lCustomerIDS;
CHAR m_szCompName[101];
ULONG lCompNameS;
..
..
};I am getting these errors: syntax: missing ';' before identifier 'ADORowClass' CSearchCustRS::ADORowClass: missing storage-class or type specifiers. The error line is the
BEGIN_ADO_BINDING(CSearchCustRS)
. I have used this method successfully before, but now it will not compile... If anybody has any experience in this area suggestions would be appriciated! Thanks -
Default CSP and GetLastError() (Encryption Problems)I changed KEYLENGTH to NULL. This fixed the problem, but I dont know why, or if this is the best way.
-
Default CSP and GetLastError() (Encryption Problems)OK, things are going better, but still having trouble. After modifying my code in accordance with the above mentioned advice, I no longer have a problem with CryptAquireContext. Now I have a problem with this:
// Derive a session key from the hash object. if(!CryptDeriveKey(hCryptProv, ENCRYPT_ALGORITHM, hHash, KEYLENGTH, &hKey)) { HandleError("Error during CryptDeriveKey."); return -7; }
returning error 2148073481 (Invalid Flags Specified). The only Flag param is the 4th. KEYLENGTH is defined as 0x00800000 at the top of my file for 128-bit encription key, and ENCRYPT_ALGORITHM is defined as CALG_RC4. I am giving it a valid hCryptProv and a valid hHash. wincrypt.h defines only on flag under the section for CryptDeriveKey (KEY_LENGTH_MASK 0xFFFF0000). I am new to the CryptoAPI and cant see what I am doing wrong. Martin?? Anyone?? -
Default CSP and GetLastError() (Encryption Problems)Thank you! This is exactly what I was looking for. Miami is going down! 08/07/2002 Welcome to the SWAMP baby!
-
Default CSP and GetLastError() (Encryption Problems)Hello, I posted on this yesterday, but I am still having trouble. I am using this code:
// Get handle to the default provider. if(!CryptAcquireContext(&hCryptProv, NULL, MS_DEF_PROV, PROV_RSA_FULL, 0)) { HandleError("Error during CryptAcquireContext."); return -4; }
to aquire a handle to the Default CSP. Handle error goes like this:void CFPCommonFunctions::HandleError(CString strFunction) { CString strMsg; strMsg.Format("CFPCommonFunctions::EncryptTransFile() - %s: %u.", strFunction, GetLastError()); AfxMessageBox(strMsg, MB_OK | MB_ICONEXCLAMATION); }
which returns the error 80090019 (I dont think this is formatted correctly by my function because I cant find this error in the Windows list) I have no problems on my Win2000 machine, nor do I have a problem on my Win98 machine that has VS6 installed. My beta users are getting this error every time, and when I try it on a fresh Win95 OSR2 install I get the error as well. MSDN says this is compatible with Win95 OSR2 and later. Can anybody see where I am going wrong??? Thanks -
Error during CryptAquireContext() - using wincrypt.hI am calling GetLastError() like this:
void CFPCommonFunctions::HandleError(CString strFunction) { CString strMsg; strMsg.Format("CFPCommonFunctions::EncryptTransFile() - %s: %u.", strFunction, GetLastError()); AfxMessageBox(strMsg, MB_OK | MB_ICONEXCLAMATION); }
This returns 80090019, but there is no corresponding code in the Windows error table. I think I am not formating this message correctly. Also, what do you mean by "don't have the high encryption pack installed"? The documentation on MSDN says that it is compatible with Win95 OSR2 and up. It relies on advapi32.dll, which these users have installed and registered... Is there something I am missing??? 9 Days till kickoff... -
Error during CryptAquireContext() - using wincrypt.hHello, I am getting an error during a call to CryptAquireContext. Here is the code:
// Get handle to the default provider. if(!CryptAcquireContext(&hCryptProv, NULL, MS_ENHANCED_PROV, PROV_RSA_FULL, 0)) { HandleError("Error during CryptAcquireContext."); return -4; }
This routine works fine on my Win2000 machine as well as another Win98 machine in the office, but our Beta users all get the same error. Is it something I am not registering/not including in the install??? If anybody has any experience with this your input would be appreciated! Thanks Football season starts this weekend! -
Using regedit and the command line...Hello, I am trying to force regedit to export a version 4 .REG file instead of version 5. This is an option in regedit, however I am using the command line
regedit /e filename destination
to do my backup. I have searched msdn and other places looking for documentation on what arguments can be passed here to force a regedit 4 export, but have had no luck at all. Does anybody have any experience with this, or know where I can look for some documentation?? Thanks Is it football season yet?
-
Overriding Context Help buttonHi, I would like to have the small help button (the one that appears in the upper right of a dialog if its context property is set to true) take the user to a page in my help file that is relevant to the dialog they working with. Is there any way that the default "turn into a question mark pointer" function can be overridden to acheive this?? Thanks in advance! Is it football season yet???
-
Problems reading from registryLen, Thanks for the advice. I am still learning how to decipher the cryptic documentation that is MSDN... Anyways, I tried this and now get "access violation reading location ..." during the query. The access specifier is set to
KEY_READ | KEY_WRITE | KEY_QUERY_VALUE
Any suggestions???
-
Problems reading from registryI am not able to get a string value from the registry. I have looked over all the posts regarding this and have not found a solution. Here is my code:
HKEY hKey = NULL;
CHAR szBuf[100];
LPDWORD lpdwLength;
CString strReturn;::RegCreateKeyEx(HKEY_CLASSES_ROOT, "CLSID", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE, NULL, &hKey, NULL);
::RegQueryValueEx(hKey, "E1", 0, 0, (LPBYTE)szBuf, lpdwLength);
::RegCloseKey(hKey);The value of szBuf after this runs is garbage, but the value is definately in the registry. Does anyone have a code example?? MSDNs code example link for
RegQueryValueEx()
doesnt link to code (go figure...) but rather to an explanation that is of no help. Nish?? You out there??? HELP!!! :confused: Thanks guys and gals. Is it football season yet?!?!?!? -
Registry backup/restoreThis is exactly what I was looking for! Thanks!
-
Registry backup/restoreI was afraid of that. Oh well, doesnt seem all that difficult to do manually so thats what ill do! Thanks.
-
Registry backup/restoreI would like to write a routine to copy registry entries into an INI file then back into the registry, but the only functions I can find in CWinApp are WriteProfile and GetProfile. Does anybody know if there is anything built-in for this task or if it must be done manually?? Any suggestions are appriciated. Thanks! Is it football season yet... GO GATORS!!!
-
Copying files/directoriesI was wondering what the quickest method to copy a folder and all of its sub-directories and files to another location would be. I am currently using a recursive function to find all files in all subdirectories then manually making the directories and copying each file over to the new location. Is there a way to copy all of this at once (like in windows when its shows the files flying from one folder to another and it makes all subdirectories in the new location)??? Any suggestions would be appreciated! Thanks
-
Moving a dialog from one program to anotherIs it possible to move a dialog from one program to another easily? it seems strange that i cant find a way to export/import dialogs from one project to another.. thanks! I miss the beach!
-
Current timeAnybody out there know how can I get the current GMT from a website such as worldtimeserver.com using CInternetSession?? I need a reliable timestamp that is not attached to the user's system time. Any tips would be appreciated! Its always 4:20 somewhere!
-
Debug Assertion in CDialog::DoModalIn dlgcore.cpp, function CDialog::DoModal(): // can be constructed with a resource template or InitModalIndirect ASSERT(m_lpszTemplateName != NULL || m_hDialogTemplate != NULL || m_lpDialogTemplate != NULL); //Fails here this is the first line of the function. any thoughts?? thanks
-
Debug Assertion in CDialog::DoModalI am getting a debug assertion that I havn't ever seen before, and I cant figure it out.:confused: If anybody has any ideas pls let me know. Thanks Here is the constructor dec: CModemInterface(CStringArray* out, CWnd* pParent = NULL); And here is where I call the dialog: CStringArray* testFiles = new CStringArray(); for(int i = 0; i < 5; i++) { CString strTemp; strTemp.Format("Test%i.txt", (i + 1)); testFiles->Add(strTemp); } CModemInterface dlg(testFiles, this); if(dlg.DoModal() == IDOK) //crash here, traced into CDialog::DoModal delete testFiles; return; :confused: