|
But I'm using #pragma. Wasn't that supposed to fix such issues? Sorry, I'm a bit of a beginner in this memory allocation business ::- D. Anyway... I tried at least 10 combinations and it crashes and crashes and crashes all the time. I'm going nuts here ::- (. Explorer.exe just won't let me delete (free) an array I created before and crashes. Even if I created it from my DLL Loader process, it's still the same DLL right? It gets attached to Explorer.exe.
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
I'm no expert in #pragma directives, but a quick Google search showed that
#pragma data_seg("SHARED")
is the right way to share *data* between applications loading the same DLL.
Axonn Echysttas wrote: Even if I created it from my DLL Loader process, it's still the same DLL right? It gets attached to Explorer.exe.
It's the same DLL, but it gets mapped to different address spaces everytime it's loaded by a process. In short, a memory addresses are specific to a process, so calling new in one process and delete on the other will definitely result in a crash.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Can some one tell me steps to be taken to rename a project.
|
|
|
|
|
As far as I remember, for VC++ 6 Rename your DSW file and your DSP file. If the environment asks you for the location of the DSP file upon loading the DSW, simply browse for it and then save all files. For .Net, might be the same but I'm not sure. You might need to rename the cppproj file. Hope that helps.
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
Assuming your project name is "blah", open up BLAH.DSP and BLAH.DSW in your favourite text editor and go to the first line on the DSP file, which will look like:
# Microsoft Developer Studio Project File - Name="blah" - Package Owner=<4>
Then do a global + all files search'n'replace for the string "blah" with the name of your new project (let's try "halb"). Save and exit. Then rename BLAH.* to HALB.* at the command prompt (you *are* using a good one like 4NT, aren't you? ) and away you go. Take 20 seconds and works.
|
|
|
|
|
HI all ,
Are there any restrictions (size wise) when using this function
my bouncechecker screams when the size of the sent buffer is greater then 6648 bytes
anyone ?
thanks
|
|
|
|
|
ita_cas wrote: bouncechecker
what's that ?
looking at the MSDN[^], i cannot see any restriction of this type...
maybe you overrun your buffer ?!
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
He means BoundsChecker, a tool manily used for checking memory usage in an application.
BoundsChecker has saved me more than once...
|
|
|
|
|
|
Hi This is Fresh programer in VC++ ,So can any one give me a brief discription , how to write a code to make it run in service mode..
Dilip
|
|
|
|
|
come on some one reply me please.....
Dilip
|
|
|
|
|
|
I am trying to obtain a file path from handle in Windows NT driver. The PFILE_OBJECT->FileName contains only the path such as "\directory\file.ext" but not the device name or drive letter. How do i obtain the device name (drive letter) for the file?
I think there could be a way throught the PFILE_OBJECT->DeviceObject, but can't dig out from the DDK documentation how to get the name of this device.
Thanx
viliam
|
|
|
|
|
Hi
I want a MFC application in which I want to scroll some text. Also sometime text might be long and sometimes it might be short. Also Font size of text might need to be as big as 200. So is there a way to do it ?
I tried using CBannerStatic example given in this site, but problem occurs when i make my text size big. It stops scrolling and consumes 100% CPU making other application work very very slow.
So I want to make it myself and text shold scroll smothly without any flickering.....is there a way to do this ?
Thankx a lot in advance
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
still on the same problem since more than one month ?!
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I have used this one AIM-Style Scrolling Banner Control
[^]and found it to work fairly well.
Either way, why note dissect the code locate the problem and let the author know. Most authors seem to enjoy others helping them with their projects.
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
if dit a bit research
and kame up hith this progy
its basicly a simple scrol text not supper fine but it choud wordk if you make it further
trik is in this
void CScrolDlg::OnBUTTONstartStop() <br />
{<br />
m_Scroltextje = m_InputTextVariabel;<br />
<br />
<br />
m_scrollengt = m_Scroltextje.GetLength();<br />
m_scrollengt = m_scrollengt -1 ;
m_Scroltextje.Delete(0,m_scrollengt+1);
UpdateData(FALSE);<br />
<br />
}
but you have to do make it a litle completer
i cant do al the work 4 u but basicly it works simple like this
her is the link for hole litle project i make
http://www.palcopy.com/down_load/scrol.zip[^]
you have to do the scrol in a timer function thats all i think you can figure it out this way
greetings to al of you
-- modified at 8:11 Thursday 10th November, 2005
|
|
|
|
|
Amarelia wrote: So is there a way to do it ?
Of course there is, but it can become complicated.
Only print the part of the text that needs to be seen and nothing else. That is you need to know: which is the first visible character and what its x coordinate is, as well as which visible character is last.
Check out GetTextExtent() amongst others.
Oh, one last note: The Windows text output functions states that they are limited to 8192 characters. That's not exactly true, the number of characters depend on the size of the font; in otherwords, the total number of pixels in the string length is limited to 32767.
INTP
Every thing is relative...
|
|
|
|
|
i try to use vc6 call the informix'sp,
but the odbc raise Exception "code=80004005,Description=[Informix][Informix ODBC Driver][Informix]Routine (get_callback_info) can not be resolved."
plz help me?
what is the right way?
my code is:
CREATE PROCEDURE get_callback_info(stt char(40))
RETURNING char(40);
END PROCEDURE
---------------------------------------
vtInValue.vt=VT_BSTR;
vtInValue.bstrVal=_bstr_t("someinfo");
_ParameterPtr pParamIn;
pParamIn.CreateInstance("ADODB.Parameter");
//pParamIn=m_pCommand->CreateParameter("str1",adBSTR,adParamInput,40,vtInValue);
pParamIn->Name="stt";
pParamIn->Type=adChar;
pParamIn->Direction=adParamInput;
pParamIn->Size=40;
pParamIn->Value=vtInValue;
m_pCommand->Parameters->Append(pParamIn);
//return value
_ParameterPtr pParamOut;
pParamOut.CreateInstance("ADODB.Parameter");
//pParamOut=m_pCommand->CreateParameter("s_mainid",adChar,adParamReturnValue,40,vtOutValue);
pParamOut->Name="s_mainid"; //param 2
pParamOut->Type=adChar;
pParamOut->Size=40;
pParamOut->Direction=adParamReturnValue; //output
pParamOut->Value=vtOutValue;
m_pCommand->Parameters->Append(pParamOut);
long iCount=m_pCommand->Parameters->GetCount();
//exec
m_pCommand->ActiveConnection=m_pConnection;
pRecordSet=m_pCommand->Execute(NULL, NULL, NULL);
pRecordSet->MoveFirst();
vtOutValue=pRecordSet->GetCollect("s_mainid");
|
|
|
|
|
Can anyone pls tell how to configure "Network Logon Security" while creating a profile using MAPI.
I need to create the profile without showing the profile creation dialog box (exchange server dialog box).
i used the following code to create a profile.
i could successfully create a profile, but the "Logon Network Security" option is set to "NT Password Authetication" by default.
i want to change it to "None" programmatically using MAPI.
how do i do that ??
please help.
Thank You.
if (FAILED(hRes = MAPIInitialize(NULL))) {
AfxMessageBox("Could not Initialize MAPI");
return FALSE;
}
if (FAILED(hRes = MAPIAdminProfiles(0,&lpProfAdmin))) {
AfxMessageBox("Could not Create Profile. Contact Admin");
return FALSE;
}
if (FAILED(hRes = lpProfAdmin->CreateProfile(szProfile,szPassword,NULL,
MAPI_DEFAULT_SERVICES))) {
AfxMessageBox("Could not Create Profile. Contact Admin");
}
|
|
|
|
|
There is some good spirit that knows the correct way to pass the parameters to a report
I explain myself better....
I have created the following objects:
.
.
.
.
try {
// Creazione istanza
m_pApplication.CreateInstance("CrystalRuntime.Application");
// Apro il report
m_pReport = m_pApplication->OpenReport((LPCTSTR)m_sFileRpt);
// Lista parametri report
IParameterFieldDefinitionsPtr pParamFieldDefinitions =
m_pReport->GetParameterFields();
LONG lCount = pParamFieldDefinitions->GetCount();
// Ciclo sui parametri del report
for(LONG lItem = 1; lItem <= lCount; lItem++) {
// Puntatore oggetto parametro
IParameterFieldDefinitionPtr pParamFieldDefinition = pParamFieldDefinitions->GetItem(lItem);
.
.
.
.
I am successful to read the parameters set up in the report but not to save them...any example in the net is in VB but not in VC++..
DateTime param or Other correctly...
Thanks in advance..
|
|
|
|
|
Hi all
I have a tree control .whenever i press ctrl+down/up arrow i want to set focus on the current item.And want to select that item
on clicking ctrl+space bar.
Please guide me , i have problem with setting the focus.I dont know the methodology to use setfocus.
Thanks
|
|
|
|
|
narayanagvs wrote: i want to set focus on the current item
Current item is the one which is selected. What do you mean by set focus?
narayanagvs wrote: want to select that item
on clicking ctrl+space bar
which item??
|
|
|
|
|
i think i might talk about synchronising the node in the treeView and the item actually opened as a document...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
what was that?
|
|
|
|