|
You can if you want
Did you get any message if you want to use it you must use of LoadLibrary for load it and then use of GetProcAddress for returns the address of funtion on the dll and in the end use of FreeLibrary if its not your question Can you more explain,please
|
|
|
|
|
But, I dont know how to do this.
|
|
|
|
|
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Im wondering,he answered to my reply and you answered to his reply I think it was reply to your answer.
|
|
|
|
|
I thought (s)he replied to DavidCrow!
*edit* And, I didn't answer....I'm still not up to speed on what the question is :)
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Maybe or maybe not.
|
|
|
|
|
Mark Salsbery wrote: I thought (s)he replied to DavidCrow!
Me too, since I got an e-mail reply. CP is having a Mon-day.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I have an application which uses a static library and a load time DLL for which the .lib is required to be added in the project settings.
when the application, both .lib file in VC6 works fine
when the application in VC8, static lib in VC8, dll's .lib file in VC6 works fine.
when the application in VC8, static lib in VC8, dll's .lib file in VC8,the application crashes.
Dr.watson is enabled and the Crash dialog shows module name as unknown, version no. 0.0.0.0.
The dump.log file also doesn't specify which module the crash is happening. FAULT --> shows to a section which doesn't specify the module name.
The dll is having a version number. but the crash doesn't show the dll.
Can anybody throw some light where could be the problem.
Thanks,
|
|
|
|
|
Why do people use Dr. Watson to debug their application ?
You should use the debugger from Visual Studio to do such things, it this much more powerfull and it will give you much more information.
If the crash doesn't occur in your own source code, use the call stack to trace it back to the root problem.
|
|
|
|
|
Hi all
Fistly , I know this is a Visual C++ forum , but i really need help on my problem in C. So kindly bear with me !!
Here is the code I wrote to get the .bmp greyscale Image Header info in C
<br />
#include <stdio.h> <br />
#include <stdlib.h><br />
#include <math.h><br />
int main()<br />
{<br />
struct Image{<br />
int rows;<br />
int column;<br />
unsigned char *data;<br />
} sImage;<br />
FILE *fpr; <br />
FILE *fpw;<br />
int i,j;<br />
char imagein[20];<br />
char imageout[20];<br />
unsigned char *ptrC;<br />
unsigned char dummy;<br />
long filesize;<br />
int r, c;<br />
dummy = '0';<br />
ptrC = &dummy;<br />
<br />
printf("Enter input image : ");<br />
gets(imagein);<br />
printf("Enter output image : ");<br />
gets(imageout);<br />
<br />
<br />
if ((fpr = fopen(imagein, "rb"))==NULL){<br />
printf("Cannot open source file \n");<br />
exit(1);<br />
}<br />
if ((fpw = fopen(imageout, "w"))== NULL){<br />
printf("Cannot open target file.");<br />
fclose(fpr);<br />
exit(1);<br />
}<br />
<br />
fseek(fpr, 0, SEEK_SET);<br />
sImage.rows = getImageInfo(fpr, 22, 4);<br />
printf("Number of rows : %d",&sImage.rows);<br />
sImage.column = getImageInfo(fpr, 18, 4);<br />
printf("Number of columns : %d",&sImage.column);<br />
filesize = getImageinfo(fpr, 2, 4);<br />
printf("Filesize : %ld",&filesize);<br />
fseek(fpw, 0, SEEK_SET);<br />
r = sImage.rows;<br />
c = sImage.column;<br />
for (i=0; i<r; i++){<br />
for(j=0; j<c; j++){<br />
fread (ptrC, sizeof(char), 1, fpr);<br />
fwrite(ptrC, sizeof(char), 1, fpw);<br />
}<br />
}<br />
fclose(fpr);<br />
fclose(fpw);<br />
getch();<br />
return 0;<br />
}<br />
<br />
long getImageInfo(FILE* inputfile, long offset, int numberofchars)<br />
{<br />
unsigned char *ptrC;<br />
long value = 0L;<br />
unsigned char dummy;<br />
int i;<br />
<br />
dummy = '0';<br />
ptrC = &dummy;<br />
<br />
fseek(inputFile, offset, SEEK_SET);<br />
<br />
for(i=1; i<=numberOfChars; i++)<br />
{<br />
fread(ptrC, sizeof(char), 1, inputFile);<br />
<br />
value = (long)(value + (*ptrC)*(pow(256, (i-1))));<br />
}<br />
return(value);<br />
}<br />
<br />
And the error I get is :-
"Conflicting type of 'getImageInfo'. "
Could anyone please tell me , where i m possibly going wrong ....
Thanks a lot !!
|
|
|
|
|
I need get address of window that focus is on the it
thanks a lot
|
|
|
|
|
Windows have addresses?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
hi
plz help me
I don't know how i can get active directory
plz help me how i con do it
thanks alot
|
|
|
|
|
Do you mean the GetCurrentDirectory() API or Directory Services[^]?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
of the directory the application is located on ... ?
|
|
|
|
|
Dear sir,
CAn anybody help me to guide how to restore and backup SQL server and MS access database using vc++...
|
|
|
|
|
gsheladia wrote: CAn anybody help me to guide how to restore and backup...MS access database using vc++...
Just the .mdb file(s)?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
thanks for your response.
Right now we required .mdb file(s) and later in second phase might be with sql server too..
|
|
|
|
|
gsheladia wrote: Right now we required .mdb file(s)...
So why not just use CopyFile() ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi all,
i am trying out a win32 application. In that i am using SHFileOperation() to copy a file from one location to another. Will it be possible to pass the network credentials to this function(username and password)? This is required when i try to copy a file from a shared location that resides in a machine in another domain. In that case, copy fails since the share is not accessible, and also it won't ask for username and password before copying.
Pls give a hand of help
Thanks in advance
SYAMLAL
|
|
|
|
|
You might want to call NetUseAdd() first, and then call NetUseDel() after copying.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi
I got some code from
http://www.codersource.net/win32_network_drive.html
-----------------------------------------------------------
#include <windows.h>
#include <lm.h>
#include <tchar.h>
#include <stdio.h>
void main()
{
USE_INFO_2 mUseInfo2;
DWORD rc,error_param123;
wchar_t lszDomain[200];
wchar_t lszLocal[200];
wchar_t lszPwd[200];
wchar_t lszRemote[200];
wchar_t lszUser[200];
mbstowcs(lszDomain, "DOMAIN", 200);
mbstowcs(lszLocal, "", 200);
mbstowcs(lszPwd, "PASSWORD", 200);
mbstowcs(lszRemote, "\\\\MACHINENAME\\C$", 200);
mbstowcs(lszUser, "USERNAME", 200);
memset( &mUseInfo2, '\0', sizeof(mUseInfo2) );
mUseInfo2.ui2_asg_type = USE_WILDCARD;
mUseInfo2.ui2_domainname = (char *)lszDomain;
mUseInfo2.ui2_local = (char *)lszLocal;
mUseInfo2.ui2_password =(char *)lszPwd;
mUseInfo2.ui2_remote =(char *)lszRemote;
mUseInfo2.ui2_username =(char *)lszUser;
rc = NetUseAdd( NULL, 2, (BYTE *)&mUseInfo2, &error_param123);
if(rc == 0)
{
printf("Authenticated \n");
}
else
{
printf("Error during Drive Mapping Authentication: %d \n");
}
return ;
}
----------------------------------------------------------------
But it won't give any drive letters in mycomputer after mapping.
Why is it so??
SYAMLAL
|
|
|
|
|
SyamlalS wrote:
But it won't give any drive letters in mycomputer after mapping.
Since mUseInfo2.ui2_local is empty, why would you expect it to?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi
Does anyone know how to write debug messages in the VC++ debug window using a c++ application, MFC application and WIN32 application.
Thanks in advance
|
|
|
|
|
Use TRACEx () , where x can be 1, 2, .....
Come online at:-
jubinc@skype
|
|
|
|