Hello No-e, You have to write the data as fixed length column files. Determine your output fields and find out the best fit MAX length of the data for each column. Then use VB/VB.net LSet(), RSet() functions are Trim() functions to write your columns in fixed length. Hope this will help you solve your problem. Nathhani
SNathani
Posts
-
Formating strings in VB6 -
LPPICTUREDISP -- CPictureHolder --- How to release memory?Hi, I've been working on an image based application. I'm using VB and VC++ to work with the images. Both are activex controls. I created a property like Get/SetActivePicture(LPPICTUREDISP pPicture). The code is given below. I'm facing memory problems. Can someone help me how can I release the memory from VC++ after I use the picture object? Thanks in advance .. I can't release the component until I solve this issue. Pls. somebody help me. The implemenation in VB is like this ... After using this, the virtual memory has been increasing each time ... the performance became too slow !!! :( .... PicEd.Open("C:\Temp.bmp") set PicEd.ActivePicture = Picture1.Picture PicEd.RotateBy(90) set Picture1.Picture = PicEd.ActivePicture() .... //---------------------------------------------------------------------- void CPicEdCtrl::SetActivePicture(LPPICTUREDISP newValue) { // TODO: Add your property handler here if (newValue == NULL) return; try { HBITMAP hBMP; HRESULT lResult; newValue->AddRef (); m_Pic.SetPictureDispatch(newValue); newValue->Release(); lResult = m_Pic.m_pPict->get_Handle((OLE_HANDLE FAR *) &hBMP); //CxImage* image; image->CreateFromHBITMAP((HBITMAP)hBMP); }catch (CException e) { e.ReportError(); e.Delete(); } SetModifiedFlag(); } // ------------ ---------------------- --------------- ------ LPPICTUREDISP CPicEdCtrl::GetActivePicture() { // TODO: Add your property handler here if (image == NULL) { m_Pic.CreateEmpty(); goto EndProp; } try { m_Pic.CreateFromBitmap (image->MakeBitmap(0)); }catch (CException e) { //Suppress any exceptions e.Delete(); m_Pic.CreateEmpty(); } EndProp: //return the IPicture dispatch interface return m_Pic.GetPictureDispatch(); }
-
How to return an IPICTURE handle to VB from VC++Hi , I"m working on an image processing application and I need a way to convert/return a BITMAP handle to IPicture, so that I can show the return IPicture in VB.PictureBox control. Nathani
-
Handling NULLs - VC -> VBHi, I'm writing an OCX in VC which passes a string containg NULLs. VB discards these NULL bytes. The length of the string shows as 0, when VC++ sends a NULL char. to the VB Event. Can someone help me How to handle these NULLs in VB? VC++, OCX event declared as ... void FireWriteToPort(LPCTSTR portData) VB handles it as ... Private Sub ThreadOCX1_WriteToPort(ByVal portData As String) ... portData becomes empty when a NULL char. comes into picture. Thanks in advance,
-
Installing VC6 SP5Just for yor information, you need to unzip all files into one folder and then run the Setup.exe that came with the 1st cab file.
-
Synchronization - Wait FunctionsHi, I tried that with WaitForSingleObject(), but it hangs up the whole thread for certain time and gives timeout messages. As far as I know, Visual Basic run all components in single thread, correct me if I'm wrong. I can't use callback functions, as this code model doesn't integrate with the existing system, which uses some other protocols. For your clarification - I'm working on ZModem, developing VC++ OCX which will be used in VB and Powerbuilder applications.
-
SetFocus from OnInitDialog for Button control.Hi, You don't have to setfocus() on OnInitDialog(), Try this one -- In design mode , go to Layout, choose Tab order, Click on the buttons that you want the tab order sequence. Run the application, -- Press Enter when the dialog shows up hope this might help you out
-
Synchronization - Wait FunctionsI'm creating a ocx in VC which is used for a custom protocol. The main handshaking and connecting to remote host etc., will be handled by a VB app. I only have to read the COM port through my local buffer variable which is set by VB app in OnComm event. If my input buffer is empty, I need to wait till I get something in my buffer? Can someone pls. help me how I can do that wihtout jamming the application. Thanks in advance,
-
ZModem protocolHi guys, I'm implementing zmodem class which is downloaded from another site, programmer's heaven. I'm implementing that class in VB for my project work. I'm not expert in VC++, but I'm able to convert the VC++ DLL into VC++ OCX and using that OCX in VB project. I made OCX cox, I need to use the same in PowerBuilder too. I exposed 3 methods InitCOMM(), SendFiles(), ReceiveFiles() to use in VB. The handle in VC++ classes for writing and reading COM port is defined as void *, and exposed them as long int. I established the connection between 2 computers using MSCOMM control in VB, and passed the MsComm1.COMMID to the InitCOMM() method to initialize the zmodem class. Now, it gives automation error when I use Send/Receive functions, .. the vc++ WriteFile() always fails to write to COM port in I/O overlapped mode. Can any one help me, how to get rid of this or any other solution for ZModem implementation. thanks in advance ========================= http://www.weilersplace.de/dl/zmodemclass.zip =========================== Nathani, Sr. Programmer