|
This is because ISAPI DLL is called from a service, which is executed on
non-interactive window station and therefore has no access to the user
desktop.
So is there anyway?
Can anyone help me ???
jude
|
|
|
|
|
Hello Everyone ...
I am trying to do uploading/downloading of file program using a VC++ as client and ISAPI Dll on the server side. Can any body help me on how to upload a file?
Well, i have tried downloading a file but had problem on exe files. On the uploading of file I still really blank ....
Can anyone help me ... or if you have sa url where i can look at or a rough sample.
Thanks,
jude
|
|
|
|
|
i set the multiline property of a textbox in a dialog box.
but at run time when press enter it doesn't go to next line.
cursor is being in the same line.
i also tried by setting the auto VScroll and Auto HScroll properties . but it won't work.
|
|
|
|
|
Set the ES_WANTRETURN style.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
|
Hi. i'm trying to understand event logging. I got this sample function from MSDN on adding source into the registry. Is this code correct? It's hard to learn something when the sample is incorrect. Thanks
<br />
BOOL AddEventSource(<br />
LPTSTR pszLogName,
LPTSTR pszSrcName,
LPTSTR pszMsgDLL,
DWORD dwNum)
{<br />
HKEY hk; <br />
DWORD dwData, dwDisp; <br />
TCHAR szBuf[MAX_PATH]; <br />
<br />
<br />
wsprintf(szBuf, <br />
"SYSTEM\\CurrentControlSet\\Services\\EventLog\\%s\\%s",<br />
<br />
pszLogName, pszSrcName); <br />
<br />
if (RegCreateKeyEx(HKEY_LOCAL_MACHINE, szBuf, <br />
0, NULL, REG_OPTION_NON_VOLATILE,<br />
KEY_WRITE, NULL, &hk, &dwDisp)) <br />
{<br />
printf("Could not create the registry key.");<br />
return FALSE;<br />
}<br />
<br />
<br />
if (RegSetValueEx(hk,
"EventMessageFile",
0,
REG_EXPAND_SZ,
(LPBYTE) pszMsgDLL,
(DWORD) lstrlen(pszMsgDLL)+1))
{<br />
printf("Could not set the event message file."); <br />
return FALSE;<br />
}<br />
<br />
<br />
dwData = EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE | <br />
EVENTLOG_INFORMATION_TYPE; <br />
<br />
if (RegSetValueEx(hk,
"TypesSupported",
0,
REG_DWORD,
(LPBYTE) &dwData,
sizeof(DWORD)))
{<br />
printf("Could not set the supported types."); <br />
return FALSE;<br />
}<br />
<br />
<br />
if (RegSetValueEx(hk,
"CategoryMessageFile",
0,
REG_EXPAND_SZ,
(LPBYTE) pszMsgDLL,
(DWORD) lstrlen(pszMsgDLL)+1))
{<br />
printf("Could not set the category message file."); <br />
return FALSE;<br />
}<br />
<br />
if (RegSetValueEx(hk,
"CategoryCount",
0,
REG_DWORD,
(LPBYTE) &dwNum,
sizeof(DWORD)))
{<br />
printf("Could not set the category count."); <br />
return FALSE;<br />
}<br />
<br />
RegCloseKey(hk); <br />
return TRUE;<br />
}<br />
From : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/adding_a_source_to_the_registry.asp
|
|
|
|
|
Hi,
In my MDI Application I use CScrollView. I need to get the full view size when the view is not in maximized.
Thanks in advance!
Have A Nice Day!
Murali.M
|
|
|
|
|
I want to save a window as a bitmap file.First I show a dialog in order to get the file name by using function domodal(),then I convert the window to a DIB and save it as a bitmap file. All is OK but the dialog is also be showed in the image!
What wrong?
I thought the dialog should not be diaplayed in the wonodw yet after the function domodal().
I have add funtion Invalidate() after the domodal(), but no change.
andy
|
|
|
|
|
You're plainly grabbing the screen while the dialog box is up - where else could it come from ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
But When will the dialog box disappear?
andy
|
|
|
|
|
Hi all !
I am buill dll application in VC++ with MFC AppWizard(dll).
In the file StdAfx.h, I have included the line follows into it's header.
#import "C:\Program Files\Common Files\System\ado\msado15.dll" \
no_namespace \
rename( "EOF", "adoEOF" )
I using msado15.dll for accessing the .mdb database. But When I builded my application, I always met some mistake . Example
'LockTypeEnum' : 'enum' type redefinition
I really don't known why ? I done well in the normal application but in dll application I can't...
pls, help me resolve the problem. Thanks alots
|
|
|
|
|
Can you try this:
#import <msado15.dll> rename_namespace("ADO") rename("EOF","ADOEOF")
|
|
|
|
|
I haved try. It done well. Thanks alots
|
|
|
|
|
Hi everybody : ). Before I begin, I must say I'm a newcommer to the world of Visual C++. Up until a few days ago I didn't know much about it, but I'm a fast learner, specially when I really have to do do something. And I really have a complex task that I need to accomplish. It's related to the SysTray. I won't get into that... anyway, the toughest part is this: creating a hook on Explorer.exe to monitor the messages it sends to the Systray's window.
What I need to make is a DLL to call from my VB application. I know how to do all that but here comes the problem. I have this VC++ DLL tutorial for a system-wide keyboard hook and I wanted to adapt this to VB.... Unfortunately, I didn't even get to adapting. Why? Because I got some compilation error that I am unable to correct. Here is the full source code of the module in cause (it's the header file of the DLL)
<br />
#define MAINHOOK_API _ _declspec(ddlexport)<br />
<br />
#define CCONV _stdcall<br />
#define NOMANGLE<br />
<br />
#define WH_KEYBOARD 2<br />
#define HC_ACTION 0<br />
<br />
typedef struct tagKBDLLHOOKSTRUCT {<br />
DWORD vkCode;<br />
DWORD scanCode;<br />
DWORD flags;<br />
DWORD time;<br />
DWORD dwExtraInfo;<br />
} KBDLLHOOKSTRUCT, FAR *LPKBDLLHOOKSTRUCT, *PKBDLLHOOKSTRUCT;<br />
<br />
LRESULT CALLBACK KeyboardFunc (int nCode, WPARAM wParam, LPARAM lParam );<br />
<br />
#ifdef _ _cplusplus<br />
extern "C" {<br />
#endif<br />
MAINHOOK_API int InstallFilterDLL(void);<br />
MAINHOOK_API int UnInstallFilterDLL(void);<br />
#ifdef _ _cplusplus<br />
}<br />
#endif<br />
<br />
Of course you already saw probably what is the problem. Yeah, I know. Those "_ _cplusplus" tags. I don't know what they mean but my VC++6 doesn't seem to "know" them. In the book from where I took this code there wasn't any mention about "what kind" of C++ is this. The basic is that it doesn't compile. Here are the errors:
warning C4067: unexpected tokens following preprocessor directive - expected a newline
error C2485: 'ddlexport' : unrecognized extended attribute
error C2144: syntax error : missing ';' before type 'int'
error C2501: '_' : missing storage-class or type specifiers
fatal error C1004: unexpected end of file found"
So? Anybody has any idea what I'm up against? : ). Thanks a lot for all the time you guys spend helping people such as myself : ). If I *EVER* get good enough, I promise I'll return the favor. And I'm a man of my word. But for now, I really need help with this...
P.S. It's for a good cause... I`m developing a freeware Application that most of you will probably like... if it's ever gonna be completed.
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
Is it my imagination or am I seeing a space between the two underscores?
Remove the space, and use two leading underscores and try again.
__cplusplus
not
_ _cplusplus
|
|
|
|
|
Nope, not your imagination... : ). But this is not the problem I think. This only solved one of the warnings of the compiler. I already did try that. I documented enough to know that __cplusplus is a known directive, but anyway, _ _cplusplus was in that book so.... Now that I put two leading underscores and compiled again I "only" get these errors:
error C2485: 'ddlexport' : unrecognized extended attribute
error C2144: syntax error : missing ';' before type 'int'
error C2501: '_' : missing storage-class or type specifiers
fatal error C1004: unexpected end of file found
Also, what I did now is replace #define MAINHOOK_API _ _declspec(ddlexport) with #define MAINHOOK_API __declspec(ddlexport) (I put two leading underscores again.)
This resulted in this error
D:\Lucru\!!Aoleo\Exp\Exp.cpp(33) : error C2485: 'ddlexport' : unrecognized extended attribute beeing repetead 7 times in my CPP file. Here is my CPP file in case you were wondering... (I posted now the full source code, the header file is in my previous post).
By the way, this is a SIMPLE WIN32 DLL (not a DLL that exports some symbols or empty DLL, so you imagine how stdafx.h and stdafx.cpp look like).
<br />
<br />
<br />
#include "stdafx.h"<br />
#include "Exp.h"<br />
#include "WINUSER.H"<br />
<br />
HANDLE hInstance;<br />
HHOOK hhookHooks;<br />
<br />
BOOL APIENTRY DllMain( HANDLE hModule, <br />
DWORD ul_reason_for_call, <br />
LPVOID lpReserved<br />
)<br />
{<br />
hInstance = hModule;<br />
switch (ul_reason_for_call)<br />
{<br />
case DLL_PROCESS_ATTACH:<br />
case DLL_THREAD_ATTACH:<br />
case DLL_THREAD_DETACH:<br />
case DLL_PROCESS_DETACH:<br />
break;<br />
}<br />
<br />
return TRUE;<br />
}<br />
<br />
MAINHOOK_API int InstallFilterDLL(void);<br />
MAINHOOK_API int UnInstallFilterDLL(void);<br />
LRESULT CALLBACK KeyboardFunc (int nCode, WPARAM wParam, LPARAM lParam);<br />
<br />
MAINHOOK_API int InstallFilterDLL(void)<br />
{<br />
hhookHooks = SetWindowsHookEx(WH_KEYBOARD, <br />
(HOOKPROC) KeyboardFunc,<br />
(HINSTANCE) hInstance,<br />
0);<br />
return 1;<br />
}<br />
<br />
MAINHOOK_API int UnInstallFilterDLL(void)<br />
{<br />
int iResult;<br />
iResult = UnhookWindowsHookEx(hhookHooks);<br />
if (iResult == 0) return 0; else return 1;<br />
}<br />
<br />
LRESULT CALLBACK KeyboardFunc (int nCode, WPARAM wParam, LPARAM lParam)<br />
{<br />
return CallNextHookEx(hhookHooks, nCode, wParam, lParam);<br />
}<br />
What do you say about this? Either that book is not good, either I'm too much of a beginner to handle this. I worked with C# in the past year and half but this is a totally different game : )
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
Whoops. Got it! I fixed it : ). Indeed I had to put two leading underscores before the "cplusplus" and also before "declspec". And then the mistake was that "DDL". It was a spelling mistake... I wrote DDL instead of DLL : ). Haha... well... anybody makes mistakes right? (what a pathetic excuse...).
Thanks Blake : )... I got this DLL working, but I do have some other problem with another one I made. Because this wasn't working I tried making it in another way by myself, as I learned this past couple of days... read the post above if you can help.
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
|
Heyyyyyyy Alok : ). You noticed me? : ). I saw your comments a few times around here. How'r'ya doing? You didn't say anything on Yahoo messanger in the past time : ).
|
|
|
|
|
So, You think i Forget you, No Baby NO! .
Anonymous wrote:
You didn't say anything on Yahoo messanger in the past time .
as usual my yahoo Messeneger is Blocked,now Again i have to find new way to hack company Firewall
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
Well, shoot an e-mail on theaxonn at yahoo dot com ! ::- ).
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
|
I haven't got any e-mail from you in a long time. Try sendin' something at "theaxonn at yahoo dot com".
The project is going strong... I need to do some stuff in Visual C++ and it's a bit hard, I never worked with it before but I began to get the hang of it ::- )
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
How do i add a custom menu(command) in the Tools menubar of MS Word? Help please, i'm a beginner!!
Also anyone knows how to disable the spell checker, progmatically??
|
|
|
|
|
|