|
or you also call the loadlibrary function in the exe application , in loadlibrary function you can directly pass the Dll
may this help
|
|
|
|
|
struct myStruct {
float f;
char ch;
long l;
};
int main(int argc, char* argv[])
{
printf ("%d",sizeof (struct myStruct ));
int* arr=new int[10];
for (int i=0;i<50;i++)
arr[i]=i;
printf("Hello World!\n");
return 0;
}
If you have an idea and I have an idea and if we share to each other then we both have two I ideas.
|
|
|
|
|
You're overrunning the bounds of your arr array by 40*4 bytes, 40 ints. I'm surprised this doesn't crash even in Debug. Please don't run it again until fixed as it's overwriting Bill only knows what and may even kill your Debugger or VS.
rahuld_150183 wrote: for (int i=0;i<50;i++)
Change this to
for (int i=0;i<10;i++) or change your array size to 50 int* arr=new int[50];
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Hi,
I want to separate the audio and video from the input avi file.How can i write the code to accomplish this.Are there any projects or url to explain how one can do this.
Regards,
Mayank
|
|
|
|
|
Hi,
I want to separate the audio and video from the input avi file.How can i write the code to accomplish this.Are there any projects or url to explain how one can do this.
Regards,
Mayank
|
|
|
|
|
As with any file types, study the file format and parse the contents
the way you want.
AVI File Format[^]
Also, if you search Code Project articles for "AVI" you'll find lots of code samples.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I'm working in a VC++ project. In this project F12 key is assigned as a vritual key for doing something. When I press this key, an exception occurs which states that,
"Unhandled exception at 0x7c901230 in Perspective.exe: User breakpoint."
When I break this exception,it goes to disassemply.
What should I do to overcome this exception?
|
|
|
|
|
See here[^]
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Sorry. There is no information available related to this particular Exception.
|
|
|
|
|
T.RATHA KRISHNAN wrote: There is no information available related to this particular Exception.
You need to know how to debug. Read the entire article I linked you to. Read even more on debugging. So that you will know how to look into the call stack window and fix the bug.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
See the debugger stack call window.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
T.RATHA KRISHNAN wrote: When I press this key...
Are you looking at the code that runs as a result of pressing the F12 key? Have you stepped through that code with the debugger?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
A "user breakpoint" is a hardcoded breakpoint: whenever such an instruction is executed (int 3 ) a breakpoint exception in generated. It's normally used to trigger the debugger when a failure is detected at runtime. As to what you should do -- the same as always: look at the call stack!
Steve
|
|
|
|
|
how can i get rid of the standart menu system from the main frame of the MDI project (MFC).
i rather use the toolbars instead. can not just delete the IDR_MAINFRAME though.
is there anybody got an idea, how to do this?
cheers
tjie pouw
|
|
|
|
|
|
May I know is anyway to retrieve the application idle notification for an application running on Pocket PC 2003 which handheld is with touch screen. Pls help and thanks in advance.
|
|
|
|
|
Doesn't the CWinApp::OnIdle get called?
AliR.
AliR.
Visual C++ MVP
|
|
|
|
|
I have tryed to use Windows Hook, but failure.
|
|
|
|
|
You might not be able to. I am fairly sure that the SAS (Secure Attention Sequence, or <CTRL+ALT+DELETE> ) cannot be intercepted, and this is by design. (Edit: This is without getting into the nitty-gritty of implementing a GINA DLL...)
The same might apply to the Lock Workstation hotkey/accelerator.
Besides, the user could still do <CTRL+ALT+DELETE> and then hit <K> or click [Lock Workstation] , so even if you intercepted <WinKey+L> the user could still lock the workstation.
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
hi...
my program is running via service.
if shutdown or restart my system, my program will start to run automaticaly.
now the problem is it is running newly.
it didn't take previous status.
like
first time
"server listening.
client1 connected.
client2 connected.
client3 connected.
client1 disconnected.
client2 disconnected.
client3 disconnected.
server disconnected."
this is my previous output.
if i restart this will start from
""server listening."
i need to update previous status.
what is the procedure?
can anyone help me?
thanks
paulraj
|
|
|
|
|
I don't understand the problem.
As with any data that needs to persist between executions of a program, you
need to persist that data somewhere. Saving to a file usually works well.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi all,
How to vb script from a C++ code.
the script is like:
Function execute()
.
.
.
.
.
.
.
execute = obj.xml 'obj.xml is a xml
End Function
the script is working fine if i write it in a vbs file and double click on it.
but how to call it from a C++ code.
I tried with IScriptControl::Run but the its not giving any output.
SAFEARRAYBOUND rgsabound[] = { 0, 0 }; // 0 elements, 0-based
USES_CONVERSION;
psa = SafeArrayCreate(VT_VARIANT, 1, rgsabound);
if (!psa)
{
return E_OUTOFMEMORY;
}
_variant_t outpar = m_pScriptControl->(m_bstrFunction, &psa); // m_bstrFunction = execute
but after execution of this statement outpar is empty.
|
|
|
|
|
Hello All
I have an application in which i use a navigate2 function but when i make a DLL , there is an exception in navigate2 function kindly look into the matter
Thanks
|
|
|
|
|
Are you sure that the exception is occurring within the Navigate2 function. Did you check for the parameters that you pass to the function.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
there are two programs one is exe ane another one is Dll in EXE there is no error and in Dll we face a exception error
i 'll pass the path of the file in Navigate2 like this
memset(szFolderPath, 0x00, MAX_PATH);
SHGetSpecialFolderLocation(NULL,CSIDL_RECENT, &pidl);
BOOL f = SHGetPathFromIDList(pidl,szFolderPath);
csTempPath.Format(_T("%s"),szFolderPath);
INT nTempIndex =csTempPath.Find(_T("Recent"));
csTempPath =csTempPath.Mid(0,nTempIndex);
csTempPath =csTempPath + _T("Local Settings\\Temp\\Sample") + csExt;
hDevice = CreateFile(csTempPath, GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
NULL, CREATE_ALWAYS,0,NULL);
if(hDevice)
{
pView->Navigate2(csTempPath);
pView->EnableWindow(FALSE);
pView->ShowWindow(SW_NORMAL);
}
the same code successfully runs in an exe but when i make a dll ithe navigate function gives the error . when i debug the code error shows in this Class C:\....MFC\SRC\VIEWHTML.CPP
just have a look the code where excatly the error promts i'll mark the arrow
void CHtmlView::Navigate2(LPCTSTR lpszURL, DWORD dwFlags /* = 0 */,
LPCTSTR lpszTargetFrameName /* = NULL */,
LPCTSTR lpszHeaders /* = NULL */,
LPVOID lpvPostData /* = NULL */, DWORD dwPostDataLen /* = 0 */)
{
ASSERT(m_pBrowserApp != NULL);
COleSafeArray vPostData;
if (lpvPostData != NULL)
{
if (dwPostDataLen == 0)
dwPostDataLen = lstrlen((LPCTSTR) lpvPostData);
vPostData.CreateOneDim(VT_UI1, dwPostDataLen, lpvPostData);
}
COleVariant vURL(lpszURL, VT_BSTR);
COleVariant vHeaders(lpszHeaders, VT_BSTR);
COleVariant vTargetFrameName(lpszTargetFrameName, VT_BSTR);
COleVariant vFlags((long) dwFlags, VT_I4);
===>>> m_pBrowserApp->Navigate(vURL,
vFlags, vTargetFrameName, vPostData, vHeaders);
}
kindly solve the issue
thanks
|
|
|
|