|
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 ) ;
|
|
|
|
|
I am looking for shared memory wrapper class that encrypts the shared memory. Does anyone know about this, or if there is any article on codeproject on this?
Thanks.
|
|
|
|
|
:(hi
I'm using in a MFC project thread by AfxBeginThread. I have a dialog window like a main window. Into this window I create a thread. Into this thread I create another dialog window. Into this dialog window I create a instance of a class and try to make a reference the second window. I don't know how to do it using standard functions so I pass a pointer as a parameter to constructor of this object. Example:
threadFunc(LPVOID pvParam){
.
.
.
CDlg* pDlg = new CDlg();
pDlg->DoModal();
}
now the in the second window:
BOOL CDlg::OnInitDialog(){
//here the address in the pointer "this" is 0x3322c9 like example
m_MyObject = new CMyObject(this);
}
in MyObject:
CMyObject::CMyObject(CWnd* pWnd){
//but here the address in "pWnd" is 0xdc3829 -.-"
m_pWnd = (CWnd*)pWnd;
}
Can someone to explain me what is happening?
Thanks for to spend time reading it =)
.Bispo
^_____^
[www.bispenho.com]
|
|
|
|
|
It's usually a mistake for one thread to access an object, especially a UI object, that belongs to another thread. If you must do this, consider using HWND instead of CWnd . A better solution is to post messages between threads.
bispenho wrote:
CDlg* pDlg = new CDlg();
pDlg->DoModal();
Calling the memory manager is not necessary. Why not do this instead:
CDlg dlg;
dlg.DoModal();
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
It isn't an UI object. So do I need to send message to another thread passing m_MyObject as parameter? If is correct how can I do that?
|
|
|
|
|
bispenho wrote: So do I need to send message to another thread passing m_MyObject as parameter?
Probably not, as long as the object is only accessed by one thread at a time.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Is it the same to pointers?
=^_______^=
[www.bispenho.com]
|
|
|
|
|
It's true for any object that is not thread-safe.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|