|
Joan Murt wrote:
I would like to know:
1. is it normal?
2. how can I know where do I occupy a handler that I don't free?
3. how do I free a handler?
1. NO, is not normal!
2. maybe it's a file HANDLE, an event HANDLE(check to see if you don't create a handle everytime you create a property sheet.(CreateEvent, CreateThread...))
3. look at BOOL CloseHandle(
HANDLE hObject // handle to object to close
); in MSDN. It's very self explanatory
|
|
|
|
|
I think that I'm in trouble then...
The problem arises when I use HTMLCtrl... (it's a class that allows to place a HTMLView inside a dialog).
It seems that each time that this control navigates to a web page a handle is occupied and that when I close the property sheet the handle is not being freed, but my problem is that I don't write any CreateThread, event, and neither I create a file...
I'm lost...
Could you imagine what is happening?
Thank you in advance.
|
|
|
|
|
Hello,
I know in the project settings of VC++ you can perform some actions only in 'pre-link' and 'post-build' times.
i have a *.bat file that i want it to run before the compilation starts.....
any1 knows how can i do it?
thanks in advanced
Yaron
Ask not what the application can do for you, ask what you can do for your application
|
|
|
|
|
In VC6 you open Project Settings dialog and go to the Pre-link Tab.
Pavel
Sonork 100.15206
|
|
|
|
|
Hi , thanks for your reply.
pre-line is not pre-comile, i need to call the *.bat before any sort of compilation starts.....
can u still help me?
Yaron
Ask not what the application can do for you, ask what you can do for your application
|
|
|
|
|
Yaron Nir wrote:
pre-line is not pre-comile, i need to call the *.bat before any sort of compilation starts.....
Sorry
If your bat file has an input file which changes, you can use a custom build rule.
Otherwise I'm sorry.
Pavel
Sonork 100.15206
|
|
|
|
|
You can export the makefile and launch the batch file from there. Then you might add the nmake call among the tools in order to do it quickly.
Or you can write an addin to handle this job easily
rechi
|
|
|
|
|
i need to know how to build a program or application(standalone) for show how to implementing Data Encryption Standard(DES)
pytongz
|
|
|
|
|
|
The following sample is MAPI from MSDN.
While runnin this is giving error:
Any help on this :
#include "mapix.h"
#include "mapiutil.h"
#include <mapispi.h>
HRESULT GetMAPIStatus(LPMAPISTATUS *pStatus, LPMAPISESSION pSession);
int main(int argc, char* argv[])
{
LPMAPISESSION pSession = NULL; //MAPI Session Pointer
LPMAPISTATUS pStat=NULL; //MAPI Status Pointer
LPMAPISUP pSupport=NULL;
HRESULT hRes = S_OK;
//Initialize MAPI.
hRes = MAPIInitialize(NULL);
//Log on to MAPI and get a session pointer.
hRes = MAPILogonEx(0, NULL, NULL, MAPI_LOGON_UI | MAPI_NEW_SESSION, &pSession);
if (hRes == S_OK && pSession) //if logon OK get a status pointer.
{
//Call function to get the status pointer.
hRes = GetMAPIStatus(&pStat, pSession);
if(hRes == S_OK && pStat) //if we successfully got a status pointer call FlushQueues on it.
{
//Flush inbound and outbound messages.
hRes = pStat->FlushQueues(NULL, 0, NULL, FLUSH_UPLOAD | FLUSH_DOWNLOAD);
if(hRes == S_OK)
MessageBox(NULL, "FlushQueues OK!", "FlushQueues", MB_OK);
else
MessageBox(NULL, "FlushQueues Failed!", "FlushQueues", MB_OK);
}
else
MessageBox(NULL, "GetMAPIStatus Failed!", "FlushQueues", MB_OK);
pSession->Logoff(NULL, 0L, 0);
}
else
{
MessageBox(NULL, "MAPI Logon Failed!", "FlushQueues", MB_OK);
}
//Clean up pointers.
UlRelease(pStat);
UlRelease(pSession);
MAPIUninitialize();
// MessageBox(NULL, "End of MAPI ", "FlushQueues", MB_OK);
return 0;
}
/////////////////////////////////////////////////////////////////
// Gets the spooler's status object from the session status table.
/////////////////////////////////////////////////////////////////
HRESULT GetMAPIStatus(LPMAPISTATUS *pStat, LPMAPISESSION pSession)
{
LPMAPITABLE pTbl = NULL;
LPSRowSet pRow = NULL;
HRESULT hRes;
SRestriction sres;
SPropValue spv;
ULONG ulObjType;
LPMESSAGE lpMsg = NULL;
const static SizedSPropTagArray(2,sptCols) = {2,PR_RESOURCE_TYPE,PR_ENTRYID};
if (FAILED(hRes = pSession -> GetStatusTable(0,&pTbl)))
{
MessageBox(NULL, "GetStatusTable Failed!", "GetStatusTable", MB_OK);
goto Quit;
}
sres.rt = RES_PROPERTY;
sres.res.resProperty.relop = RELOP_EQ;
sres.res.resProperty.ulPropTag = PR_RESOURCE_TYPE;
//sres.res.resProperty.ulPropTag = PR_STATUS;
sres.res.resProperty.lpProp = &spv;
spv.ulPropTag = PR_RESOURCE_TYPE;
spv.Value.l = MAPI_SPOOLER;
if(FAILED(hRes = pTbl->SetColumns((LPSPropTagArray) &sptCols,
TBL_ASYNC)))
{
MessageBox(NULL, "SetColumns Failed!", "GetStatusTable", MB_OK);
goto Quit;
}
if (FAILED(hRes = HrQueryAllRows(pTbl,
(LPSPropTagArray) &sptCols,
&sres,
NULL,
0,
&pRow)))
{
MessageBox(NULL, "HrQueryAllRows Failed!", "HrQueryAllRows", MB_OK);
goto Quit;
}
if (!pRow -> cRows || PR_ENTRYID != pRow -> aRow[0].lpProps[1].ulPropTag)
{
hRes = MAPI_E_NOT_FOUND;
MessageBox(NULL, "HrQueryAllRows Failed!", "HrQueryAllRows", MB_OK);
goto Quit;
}
/* hRes = pSession->OpenEntry(pRow -> aRow[0].lpProps[1].Value.bin.cb,
(LPENTRYID)pRow -> aRow[0].lpProps[1].Value.bin.lpb,
NULL,
MAPI_BEST_ACCESS,
&ulObjType,
(LPUNKNOWN*)&(*pStat));
*/
if (FAILED(hRes) || MAPI_STATUS != ulObjType)
{
hRes = hRes ? hRes : MAPI_E_INVALID_OBJECT;
MessageBox(NULL, "OpenEntry Failed!", "OpenEntry", MB_OK);
goto Quit;
}
Quit:
if (pTbl)
pTbl -> Release();
FreeProws(pRow);
return hRes;
}
Thank you
|
|
|
|
|
hi all,
i am making a tool bar for Internet Explorer.
I am using KBBar Sample that is provided in MSDN as well as on www.codeproject.com for downloading.
when the width of the Band containing the toolbar is made small, chevrons appear. When chevron is clicked buttons are displayed in a menu.
when these buttons(drop down buttons as well as normal push buttons) are clicked, Neither do they send any WM_COMMAND Message Nor do they send any TBN_DROPDOWN notification.
Where as in normal simple state (when band containing toolbar is of normal size), these notification and messages are observed sent and are handled easily.
i will be thankful , plz help me.
regards
Farrukh
|
|
|
|
|
My current version is 6.4.9.1125.
I want to build up a customized Media player based on this control.
THanks
JW
DJ
|
|
|
|
|
|
Thank you, Mike.
But what I want is just the Media Player Control (msdxm.ocx) file so that I can use this latest version in my VC++6 project?
Any more ideas?
DJ
|
|
|
|
|
But the control is part of media player - you won't be able to update one without the other (and installing the latest media player will update the control too)
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
Why am I thinking that I have seen this function(or named diffently of course) some where before but I can not find any info on how to logically get the user's current version of windows? What is the most logical way to get the user's current version of windows?
Thanks
Later, JoeSox www.joeswammi.com It's not easy facin' up when your whole world is black Rolling Stones
|
|
|
|
|
It's called GetVersionEx()
--Mike--
THERE IS NO THERE IS NO BUT THERE IS
MAGIC PIXIE DUST BUSINESS GENIE CODE PROJECT
Homepage | RightClick-Encrypt | 1ClickPicGrabber
If privacy is outlawed, only outlaws will have privates.
|
|
|
|
|
Thank you thank you, I thought I was going crazy.
Oh wait, don't reply to that last comment;P
If I only had all of the MFC functions memorized then maybe I wouldn't be so dependant on MS search technology, rather lack of it
Later, JoeSox www.joeswammi.com It's not easy facin' up when your whole world is black Rolling Stones
|
|
|
|
|
According to MSDN:
Every process that loads the DLL maps it into its virtual address space. After the process loads the DLL into its virtual address, it can call the exported DLL functions.
Suppose a process starts and at some stage it dynamically loads a dll. A second process also load the same dll. Now what actually happened ??? Do each of these processes share the same chunk of memory where dll is loaded or dll code is loaded at two different locations for both of these processes ???
|
|
|
|
|
Yes, the two processes share the same chunk of memory.
~ Vimal
|
|
|
|
|
Vimal Earnest wrote:
Yes, the two processes share the same chunk of memory.
Suppose the function exposed by the dll has some static variable. Now what happens in this case...whether both applications that are using this dll share single copy of variable ???
|
|
|
|
|
What happens is, the COW (Copy On Write) mechanism is used by the system to make a private copy of these variables. To be specific, the system makes a private copy of the memory section containing static and global variables in the process modifying these variables.
refer chapter 19 (DLL basics) of Jeffrey Richter's Programming Applications for Microsoft Windows 4th ED for more info.
~ Vimal
|
|
|
|
|
dear all,
i have a menu for controlling from 0 - 100%, total 11 steps (11 items in menu)...
if i use individual message handler for each item, there are 11 functions... but, their difference is just the control value.
so, anyone have any idea to multiple handle menu items with single handler function?
thanks,
jim
|
|
|
|
|
Use ON_COMMAND_RANGE in the message map.
rechi
|
|
|
|
|
I've learnt earlier that we just have to check "Group" property of the first radio button to group the subsequent radio buttons under it. However after some time, i decided to add another 2 radio buttons on the dialog box. Visually, it's just below the previous radio buttons.However i don't know how to place them under the previous group of radion buttons....
can anyone help?
thanks
|
|
|
|
|