Hi I have converted the whole file content to base64 binary stream using the below java script code. After converting I persisted into the database column. fileNode.dataType = "bin.base64"; // open stream object and read source file var adoStream = new ActiveXObject("ADODB.Stream"); if (adoStream.State != 1) { adoStream.Type = 1; // 1=adTypeBinary adoStream.Open(); adoStream.LoadFromFile(strFileName); } I can also retrieve the same base64 content to client side. Now I want to generate the same file using the base64 content. Can anyone tell me now how to convert the base64 to original file format using java script.
Gokul_md
Posts
-
How to generate a file from base64 binary stream tusing java script -
How to add a button in ClistCtrl?Hi i have an Extended ClistCtrl, in which i want to insert a button at the bottom right. i can able to create the button using the nelwo code , lButton=new CButton(); lButton->Create(_T("Select All & Next"), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON |BS_MULTILINE, CRect(520,280,600,320), this, IDC_BUTTON1); lButton->ShowWindow(SW_SHOWNORMAL); but when i am scrolling the list control the button image also getting painted in various places and flickering . how to handle this? Thanks Gokul
-
Re : Displaying the icons only for subitems in the CListCtrl.Hi i have two columns in the CListCtrl. i want to display the immage only for the subitems and not for the first column. The CListCtrl has set the extended style property of LVS_EX_SUBITEMIMAGES. when i am trying to load the icons for the subitems it also displayes the first column. how to avoid displaying the icon in the first column?. is there any restrictions or precondition required? Thanks in Advance Gokul
-
How to display the gridlines only for row in ClistCtrl?Hi i Have a ClistCtrl and i want ot display the gridlines only for the rows and not for the colums. i have extended my style using the LVS_EX_GRIDLINES property. how to achive this? Thanks in Advance Gokul
-
GetPrinter function fails to retrieves the printer information. [modified]i have formated the message using the below method. LPVOID lpMsgBuf; FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | RMAT_MESSAGE_FROM_SYSTEM, NULL, dwError, MAKELANGID(LANG_NEUTRAL, LANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0,NULL ); CString strMessage = (LPTSTR)lpMsgBuf; The error message is printed in the log file. FILE *fp = fopen("C:\\log.txt","a+"); fprintf(fp,"\n Error Occured - %s ", strMessage ); fclose(fp); in that log file it printer as Error Occured -
-
GetPrinter function fails to retrieves the printer information. [modified]Yes i have formated the dword error code to string in the above mentioned way only. but it return the empty string.
-
GetPrinter function fails to retrieves the printer information. [modified]The Get Printer function will return required buffer size in dwNeeded. I hope this should always be greater than zero. So I checked with the buffer size. When I am trying to print the last error code it is printed nothing (empty).
-
GetPrinter function fails to retrieves the printer information. [modified]Hi Please help me to find out the problem in GetPrinter function. First I am trying to get the printer handle for the specified printer using OpenPrinter function. . HANDLE hPrinter = 0; OpenPrinter ((LPTSTR)(LPCTSTR)strPrinterAddress, &hPrinter, NULL); This function gets succeed. Using this printer handle I am trying to access the specified printer information’s using the GetPrinter function. GetPrinter(hPrinter, 2, NULL, 0, &dwNeeded); if(!dwNeeded) { DWORD dwError = ::GetLastError(); ClosePrinter( hPrinter ); } Even using GetLastError() function I am not able retrieve error message. This function is not failing all the times. When I am trying to print out of 10 times, 6 times the printing is succeed. Only 4 times it’s getting failed. Please help me shoot out this problem. Thanks Gokul
modified on Tuesday, October 14, 2008 4:08 AM
-
Remote path validationHi This is only working for local directories. Not for remote shared path validation. how to check the remote machine shared directory path is valid or not?
-
Remote path validationhi how to validate a given directory path ( in a remote machine whether the path is valid or not) in vc++? and also how to execute a dos command in MFC?