Still I am getting only ABC in VB So please tell me how to send full string. I am getting what you have told me. but I want to transfer this full string from vc to vb. So please tell me the solution It's very urgent Thanks for help.
chetanjoshi9
Posts
-
Fire Event BSTR with NULL character -
Fire Event BSTR with NULL characterHello sir, I have created the COM component in VC6.0 using ATL 3.0 I am using it in VB6.0 I have added the BSTR Event. I want to pass the string with NULL character in between the string from VC to VB e.g. I want to fire a event with string "ABC\0XYZ" So I can get the complete string in VB as ABC[]XYZ [] - indicates box as unicode character. But I am getting only "ABC" string. Please tell me the way to pass the string with NULL character from vc to vb. It's very urgent. Please do the needful. Thanks.
-
Problem with ATL COM Dll.... Firing event in threadplease tell me how to use CoInitialzeEx() on StatusThread.. I am not getting.... Please...
-
Problem with ATL COM Dll.... Firing event in threadhStatusThread = CreateThread(NULL, 0, LPTHREAD_START_ROUTINE(StatusThread), (LPVOID)this, 0, (LPDWORD)&dwStID); ::SetThreadPriority(hStatusThread, THREAD_PRIORITY_HIGHEST); UINT StatusThread(LPVOID param) { MSG msg; CMyTestObj *ptrObj = (CMyTestObj*)param; while(1) { if(!GetMessage(&msg, NULL, 0, 0)) return 0; switch(msg.message) { case START_COMMAND: ptrObj->Fire_ErrorCode(123); break; } } } This is my code I am firing event in thread as PostThreadMessage(dwStID, START_COMMAND, NULL, NULL); but application crashes at line "ptrObj->Fire_ErrorCode(123);" But if fire event in any member function (without thread) it works fine.. Please help me for this.. it's very urgent Thanks.
-
Problem with ATL COM Dll.... Firing event in threadplease tell me the settings required while creating the new ATL object if we want to fire event within the thread....
-
Problem with ATL COM Dll.... Firing event in threadwhat is mean by thread aware?
-
Problem with ATL COM Dll.... Firing event in threadHi, I am using the ATL COM DLL. In this I am createng two threads. I have added new ATL object which supports connceting point, appartment thereaded model, Dual interface and agregation=yes. While creating thread and passing the interface pointer as this pointer. hStatusThread = CreateThread(NULL, o, LPTHREAD_START_ROUTINE(StatusThread), (LPVOID)this, 0, &dwThStId); ::SetThreadPriority(hStatusThread, THREAD_PRIORITY_HIGHEST); I am accessing the interface pointer in thread and firing the event.. UINT StatusThread(LPVOID param) { CMyConnectObj *ptrObj = NULL; ptrObj = (CMyConnectObj*)param; if(ptrObj == NULL) return 0; if(WaitForSingleObject(g_Mutex,INFINITE) == WAIT_OBJECT_0) { ptrObj->Fire_ErrorCode(lErrorCode); ReleaseMutex(g_Mutex); } } I am using vb6.0 client to use this dll. but while firing event at line i ptrObj->Fire_ErrorCode(lErrorCode); it's giving error as "Unhandled Exception in ConnectProg.exe (MSVBVM60.dll)0x0000005: Access Violation. But if I tried to fire event for one of the ATL object function there is no problem at all. Please help me for this with perect solution.. It's very urgent.
-
Problem with COM DLL---- Firing event in threadHi, I am using the ATL COM DLL. In this I am createng two threads. I have added new ATL object which supports connceting point, appartment thereaded model, Dual interface and agregation=yes. While creating thread and passing the interface pointer as this pointer. hStatusThread = CreateThread(NULL, o, LPTHREAD_START_ROUTINE(StatusThread), (LPVOID)this, 0, &dwThStId); ::SetThreadPriority(hStatusThread, THREAD_PRIORITY_HIGHEST); I am accessing the interface pointer in thread and firing the event.. UINT StatusThread(LPVOID param) { CMyConnectObj *ptrObj = NULL; ptrObj = (CMyConnectObj*)param; if(ptrObj == NULL) return 0; if(WaitForSingleObject(g_Mutex,INFINITE) == WAIT_OBJECT_0) { ptrObj->Fire_ErrorCode(lErrorCode); ReleaseMutex(g_Mutex); } } I am using vb6.0 client to use this dll. but while firing event at line i ptrObj->Fire_ErrorCode(lErrorCode); it's giving error as "Unhandled Exception in ConnectProg.exe (MSVBVM60.dll)0x0000005: Access Violation. But if I tried to fire event for one of the ATL object function there is no problem at all. Please help me for this with perect solution.. It's very urgent.
-
Problem with VC++ OCX in VB6.0I am using the VC 6.0 ocx in VB6.0 In this ocx I am firing the event in thread with long value as parameter. There is only single thread. I am getting the correct value in client(vb) application. It's working fine when I am running it. But when I tried to debug in VB application in event after pressing F8 application suddenly exits. But without threading it's I can debug also. I could not get the problem. When I used try catch around fire event it gives exception as memory could not read. Help me for this.... Thanks in advance.
-
Blue border displayed while using dhtml control_Url asignmentHi, I am currently using the dhtml control to assign the url fo picture element within the web page. After assigning url to image the thick blue border is gets displayed arround it. For assigning Url I am creating MAP arround the image. And also this sometimes displays and sometimes not. I also viewed the HTML source for the wev bage I could not found any attribute which displayes this blue border. I also previously posted this issue with othere forum and I found replay that I have to set explicitly "border=0" for that object. But this is also not working. Pleae help me for this... It's very urgent. Thank you.
-
Event Handling for Dynamically created ListBoxPlease can you explain with simple code?
-
Event Handling for Dynamically created ListBoxHi, I am createing new ListBox on dialog box at runtime. it's creating fine but I want to handle the events over that. I want to Handle event as ON_LBN_SELCHANGE(IDC_PREVIEW_LIST, OnSelchangeList) in message map. but id IDC_PREVIEW_LIST is passed by me at run time in as CListBox m_PreviewList; m_PreviewList.Create(WS_CHILD|LVS_ICON|WS_VISIBLE|WS_BORDER|LBS_OWNERDRAWFIXED|LBS_MULTICOLUMN, rect, this, IDC_PREVIEW_LIST); and it's not know in messge map. So please guid me how to handle dynamically created window events.
-
Change Window ColorI have created the Test SDI application with MfcAppWizard(exe). I run the appication an it's showing me default window. It has default window color as RGB(192,192,192). But I want to change it to some different color for better look. How can I change it's defauld color for my application so that all window forms, dialog boxes, tool bars, menus, etc having some new default colors like sky blue or somthing else. Please help me regarding this.
-
hide plus sign for empty folder in CTreeCtrlI am using CTreeCtrl ni my project. I am populating this tree with hard dis folder. There are some empty folders for which it is showing plus sign for expanding and nothing is happening when I click on plus sign. So please help me to hide that plus sign for empty folder in CTreeCtrl. Thank you.
-
Error in CInternetFile CFtpConnetion->OpenFile(.....)I am trying to upload one directory to the perticular server I have written the code as CInternetFile *pInternetFile = 0; pInternetFile = pFtpConnection->OpenFile(strDestFilePath, GENERIC_WRITE, FTP_TRANSFER_TYPE_BINARY, FtpConnection->GetContext()); CFile LocalFile; LocalFile.Open(strSrcFilePth, CFile::modeRead); TCHAR szBuffer[256] = ""; int iRC = 0; while((iRC = LocalFile.Read(static_cast(szBuffer), sizeof(szBuffer))) != 0) { // Write to file pInternetFile->Write(static_cast(szBuffer), iRC) ; m_lDestFileSize = m_lDestFileSize + sizeof(szBuffer); // Clear buffer memset(szBuffer, 0, sizeof(szBuffer)); } This code works for only one file and fails for second. Please help me go this. Thank you
-
check how much bytes are transsferred from port 21Please let me know how much bytes transfferd by putfile() function. Is there any api avilable?
-
calculate how much bytes transfferd by putfile() functionHow to calculate how much bytes transfferd by putfile() function at any instant
-
Check Internet speedPlease let me know how can I get the current internet speed in vc++ Is there any API available?
-
Get how much bytes transferred CFTPConnetion and PutFile()I am using CFTPConection class. While uploading file via PutFile() function I also want to display the destianion file size i.e. data uploaded up to perticaulr instant. I could not make the connetion for that file as it is uploding i.e. it's open for writting. So is there any way to check how much data transferred up to perticuar time. This value amy be in number of bytes. Or is there is any othere option rather than Putfile() which uses buffer so that I can check buffer size.. please help me for this.. Thank you so much..
-
Retreive Createion and Modification time for Remote fileI have writen code as BOOL bResult = fileFind.FindFile(strFilePath); if(bResult) { bResult = fileFind.FindNextFile(); CTime createTime; CTime modTime; fileFind.GetCreationTime(createTime); fileFind.GetLastWriteTime(modTime); CString strCreateTime = createTime.Format("%H:%M:%S, %A, %B, %d, %Y"); CString strModifyTime = modTime.Format("%H:%M:%S, %A, %B, %d, %Y"); } but I am getting wrong values as Thursday, January, 01, 1970 Please help me to solve this problem