|
hi, all
I am trying to understand why the app crashes, lots of time it bring up the Disassembly and it's totally just out of my lead....could anybody share some good assembly language links, I just need to understand the basic assembly commends...thank you for your time
|
|
|
|
|
valerie99 wrote:
could anybody share some good assembly language links, I just need to understand the basic assembly commend
Hope this Work :-
http://win32assembly.online.fr[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
in VC.net, I have a windows application( say project A) "call" another application ( say project B) using CreateProcess(....) approach to run a exe file generated in project B. A is startup project. It's OK to set breakpoint in the files of project A. but it's not OK to set breakpoint in file of project B. I know is project B generate DLL, then it's fine to set breakpoint in file of Project B. Is there anyone have this experience?
|
|
|
|
|
The VS Debugger must "attach" to a process to debug it (hit breakpoints, etc.). Since Project B is launched via CreateProcess() and NOT from the debugger, so the debugger has no association be Project B and the executeable created with CreateProcess().
What you need to do is set a breakpoint right after CreateProcess(). Then, in another instance of VS, open the solution file, and goto "Debug"->"Processes". Select the recently launched executable and click "Attach".
|
|
|
|
|
HI Friends
Iam making a VC++ dialog based application with a Edit box and Run
Button. In the dialog class called TestDlg.cpp, there is a function
called OnMessage(), it is implemented as,
void OnMessage()
{
MessageBox("Hello World");
}
Now iam gonna type in the Edit box,
set a [OnMessage] and click Run Button in GUI
Now the TCL interpreter should be able to find the command OnMessage
and call back the void OnMessage function in TestDlg.cpp in GUI. And popup
the message box.
Is it possible to do something like this? Can anyone please tell me how
to do this?
Thanks in Advance
Don
|
|
|
|
|
I am not sure, but i think its possible using MACROS, search the internet for advanced macros and I think its really possible
Regards,
Mohammad Gdeisat
أعلنت إستسلام قلبي لرحيلك..دعه يودع خطوات سيرك..فقط إجعل قلبك يحتضن حروفي ويشعرها بدفئه..دعني أرسم ألوان طيف حلمي وحلمك..دعني أُقبل جبين قلبك..وأهديك عالمي بأسره
فقد مللت كل لحظا تي بدونك....فمابقي لي إلا أن أثني على قسوتك....
فليتك تعلم كم أنهكتني...وكم أحرقتني...وكم جعلت مني وطنا بلا معالم.
فـــدعنــي أبـــكي على شواطئ دفئك...قاتلي
|
|
|
|
|
I hope someone can help me with this one.
I created a DLL to be used by one of my programs. Here is the code I use to load the DLL:
HINSTANCE hDLL;<br />
int iReturnVal;<br />
MYDLL dll;<br />
<br />
hDLL = LoadLibrary("MYDLL.DLL");<br />
<br />
if (hDLL != NULL)<br />
{<br />
}<br />
else<br />
{<br />
iReturnVal = MessageBox("Missing DLL: MYDLL.DLL","ERROR",MB_OK);<br />
}<br />
When I run my program in the development workstation (where Visual Studio is loaded), it executes without a problem.
I moved the executable and the dll to a different testing PC (along with msvcr70.dll and mfc70.dll, needed becuase that PC didn't have them).
I put the executable and the three dll's (the MS ones and my own) in the same directory. I can start my application but when I try to use the section that executes the code above, I get the "Missing DLL: MYDLL.DLL" message.
Any ideas?
Am I missing something?
|
|
|
|
|
if the DLL isn't in one of the folders in your PATH (environment variable), the OS can't load it.
try putting the DLL in your main Windows (WINNT, Windows, whatver) folder.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Thanks Chris,
But the DLL is not in one of the folders of my path in the development PC. How can it work there just by putting it in the same directory as the executable but not work in the other PC?
|
|
|
|
|
|
|
Thanks,
I found the missing DLL
|
|
|
|
|
Windows documentation CLAIMS that the folder from which the parent process was loaded will also be searched. With the DLL in the same folder as the EXE it should have worked. What is more likely is that some OTHER DLL that MyDLL depends upon is missing.
|
|
|
|
|
hi,
i am working in win32 application using MFC.
actually i have to draw moving concentric circles i.e dynamically 10 circles , one above another should open like a flower and close it, and this should continue until i stop it. whichever position i stop it , in that stage it should show.
e.g,
when i click my mouse on client area of window. concentric circles should be generated in a moving fashion , not at the same time all circles should be displayed. up on reaching 10th circle automatically it should decrease in the same moving fashion. this process should be continued until i reclick my mouse on the client area.
thanku for ur patience in reading,
could u provide me any suggestions
thanks
|
|
|
|
|
You can use CDC::Ellipse[^] to draw circles.
As for drawing concentric circles, you need to use a timer[^] to progressively draw smaller/larger circles. On each tick of the timer, check if you are expanding or collapsing, then use the appropriate radius for the circle and draw it.
You also need to check if the mouse has been clicked between two ticks of the timer and if so, prevent further drawing.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I've tried looking up this error elsewhere with no luck. Here is what im doing to cause the error. First creating a pointer to a byte(or char, whatever) of data:
char* data = (char*)malloc(sizeof(char));
memset( data, 0, sizeof(char) );
Then read in a char from a open file:
file.Read( data, sizeof(char) );
Then check for either '\t' or '\n'... All variables have been declared as follows
bool out;
CString str;
CFile file; // this has been opened properly, and ready for reading.
UINT32 tmp;
byteSwap bs; // All this does is change a UINT32 to a float, and vice versa.
do
{
out = false;
str.Empty();
do
{
file.Read( data, sizeof(char) );
if( *data == '\t' )
{
tmp = (UINT32)atoi( str.GetBuffer() );
bs.i = tmp;
msg.icd.gimary.points[i][0] = bs.f;
str.Empty();
} else if ( *data == '\n' ){
tmp = (UINT32)atoi( str.GetBuffer() );
bs.i = tmp;
msg.icd.gimary.points[i][1] = bs.f;
out = true;
} else {
char ch = data[0];
str.AppendChar(ch); // Error here
}
}
while( !out );
i++;
}
while( i < msg.icd.gimary.numPoints );
After a large portion of the file has been read, i get an error in dbgheap.c @ line:612, which is a _CrtCheckMemory() failure... Any ideas on how this is caused? If you need more info, just post. I'll reply within 5 mins or so. Thanks in advance!
|
|
|
|
|
Jader89 wrote: char* data = (char*)malloc(sizeof(char));
memset( data, 0, sizeof(char) );
Then read in a char from a open file:
file.Read( data, sizeof(char) );
This is pointless. Why are you bothering the memory manager for something so trivial?
char data;
file.Read(&data, sizeof(char));
Jader89 wrote: tmp = (UINT32)atoi( str.GetBuffer() );
Unless you have plans on modifying str , the call to GetBuffer() is not necessary.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
yes your right, ive been changing it around alot trying to solve this error, and wasnt paying attention to that aspect. Its changed now, but this doesnt help the fact that this error is caused by the AppendChar() which calls a ReAllocate method, and after the 1024, (default) time through, it calls the _crtCheckMemory() and fails, I've even tried doing it after 16 times through by changing a crt flag, still fails... My problem is that i dont see why this check is failure, and why my heap is losing integrety.
|
|
|
|
|
Jader89 wrote: ...this error is caused by the AppendChar()...
What class is this a method of? Are you using VC++ v6 or .Net?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Its a method of CString, and im using .NET ... Sorry for the late response.
|
|
|
|
|
I have been working on this all night and into the day. Can someone please help me with the mistakes that I have made. Please help.
// This is the main project file for VC++ application project
// generated using an Application Wizard.
#include "stdafx.h"
#include <math.h>
//#using <mscorlib.dll>
//using namespace System;
void display_statement (double, double, double, double, int, double);
double Tinterest_paid(double, int);
double payment_amount (double, double, int);
int main(void)
{
double a=1;
double b=1;
double c=1;
double d=1;
double e=1;
double x=1;
double i; // Interest_Rate Monthly
double p; // Principal
int n ; // Number Payments display_statement
double Payment_Amount;
double payment;
double Total_Amount;
double total_amount;
double Tamount_paid;
double total_interest;
double Tinterest_paid(double, int);
double payment_amount (double, double, int);
printf("Please Enter Interest Rate "); // Key As n.n
scanf("%lf",&i);
printf("Please Enter Loan Amount "); // Amount of Loan
scanf("%lf",&p);
printf("Please Number Of Monthly payments "); // Number Of Monthly
scanf("%d",&n);
payment = Payment_Amount (i,p,n);
Total_Amount = Tamount_paid(payment,n);
total_interest=Tinterest_paid(total_amount,p);
void display_statement (double, double, double, double, int, double);
}
{
double x;
x = Tinterest_paid(200000, 150000);
printf("The result is\n\n %f', X);
return 0;
}
double Tinterest_paid (double amount_paid, double Principal)
{
double int_paid;
int_paid = amount_paid - Principal;
return (int_paid);
{
double x;
x = Payment_Amount(5.5, 100000, 60);
}
double Payment_Amount (double Interest_Rate, double Principle, int Number_Payments)
{
double a, payment;
a = Interest_Rate/100;
a= a/12;
payment = (a* Principle)/ (1 - pow((1+a), -Number_Payments));
return(payment);
}
{
display_statement (a, b, c, d, x, e);
return 0;
void display_statement (double payment, double loan_payment, double Tinterest, double Principal, int Number_Payments, double interestrate)
{
printf("Monthy Payment: $%.2f\n\n", payment);
printf("Total Loan Amount; $%.2f\n\n", loan_Amount);
printf("Total Interest Payment: $%.2f\n\n", Tinterest);
printf("Principal: $%.2f\n\n", Principal);
printf("Number Of Payments: %d\n\n", Number_Payments);
printf("Interest Rate %.3f percent\n\n", interestrate);
}
Joseph L. Gelsomino
|
|
|
|
|
can you help us a bit here ?
what is not working ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
none of it, I can't seem to get pass the build
Joseph L. Gelsomino
|
|
|
|
|
WackoWolf wrote: #include
//#using
//using namespace System;
void display_statement (double, double, double, double, int, double);
I'm going to guess that your first problem is that the compiler can't find include file void.
You need to start small wirte a hello world progam get that to compile then try agin with this project. Its had for us to help with compile erros when you don't post the messages.
a programmer trapped in a thugs body
|
|
|
|
|
Your problem is that you have a lot of NON matching braces
for example:
{ <-------------------------------- here
display_statement (a, b, c, d, x, e);
return 0;
void display_statement (double payment, double loan_payment, double Tinterest, double Principal, int Number_Payments, double interestrate)
{ <-------------------------------- here
printf("Monthy Payment: $%.2f\n\n", payment);
printf("Total Loan Amount; $%.2f\n\n", loan_Amount);
printf("Total Interest Payment: $%.2f\n\n", Tinterest);
printf("Principal: $%.2f\n\n", Principal);
printf("Number Of Payments: %d\n\n", Number_Payments);
printf("Interest Rate %.3f percent\n\n", interestrate);
} <-------------------------------- here
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|