|
Hello,
I am writing a program that access a MSSQL 2000 3 times, in a windows 2000 evirenoment.
The problem is that the dbopen() function fails randomly in one of the 3 times it tries to open the database the error says:
DB-LIBRARY error:
NULL DBPROCESS pointer encoutred.
it happens that sometimes the program runs without errors.
the same program was running before on a windows NT4 /MSSQL 7 without problems.
|
|
|
|
|
Hi ,
I have a dll , which displays a dialog box. and I need to
invoke this dialog through a HTML page. There would be a
string send from the HTML to the dialog , and after processing, from the Dialog back to the HTML page.
Can someone please tell how can I achieve this.
Thanks
Sanksy ;-D
sp
|
|
|
|
|
Ordinary DLLs are not normally used, at least not easily in IE. Convert it to a COM server or write a simple COM server to access the DLL.
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
I'm assuming the DLL is installed client side and not on the server.
You could create a COM DLL and launch the COM object from the VBScript/JavaScript with CreateObject
or you could possible using an ATL composite control and embed the dialog in the HTML page.
Michael
|
|
|
|
|
Thanks for the help.
If the DLL happens to be a Normal DLL, so in such case how
do I handle it?
Thanks -n- Regards,
sanjay
|
|
|
|
|
You'll need to write a COM wrapper DLL which calls your DLL functions. The ATL wizard will generate a simple com object, add a method called ShowDialog and then put the call to the DLL in the generated function.
It's a bit of a hack but should allow you to call your DLL from a HTML page.
Michael
|
|
|
|
|
Hello, the codegurus around the world.;)
I think that we may use DelayLoadProfile approaches.
That is, we can insert this DLL process in IE process,
and hook some function to show HTML page.
(Humm, IE may use COM, so hook socket?)
Good luck.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
Hi,
i have a function:
void Trace ( const int nTraceLevel, const _TCHAR *pszMessage, ... ) const;
but i want to be able to call this function without specifying the Tracelevel.
so i want to declare another function like this
void Trace ( const _TCHAR *pszMessage, ... ) const;
which then calls the othere trace function with nTraceLevel = 0
But calling it like this fails:
Trace ( 0, pszMessage, ... );
It have me an error when i tried to do that. Is it possible to do that?
If so, how?
Thanks,
Bene
|
|
|
|
|
e.g.
va_list args;
va_start(args, pszMessage);
Trace(0, pszMessage, args);
va_end(args);
|
|
|
|
|
hhmm, i spoke to soon. it at least compiles but when i get the info in my main trace functions, the values it gets from the va list are invalid.
any other suggestions?
|
|
|
|
|
I don't realy understand what you want.
but I have a define for ya:
#define GetParam(arg,num) (((int *)(&arg))[num])
the GetParam will give you the arguments of the function.
e.g.
func(const char * format, ...)
and call it like this
func("%d %s %c", 123, "123", 's');
than use the get param like this:
int a=(int)GetParam(format,1);
char * b=(char *)GetParam(format,2);
char c=(char)GetParam(format,3);
NOTE: on a 32bit OS you'll have a little problem getting the __int64 value (I'll let u discover yourself how to do that);)
BTW: for some of you that wished for CodeProject irc server
I create a channle on DalNet called "#CodeProject "
|
|
|
|
|
Ack, never write your own argument list picking function. They aren't at all portable. (But of course, if you don't care about portability, more power to you!)
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
I've been throe HELL, trying to understand the CRT source code, printf for example.
and believe me, it's not much fun. (i'm still confused)
Portable ? depends on the operating system.
if it's a 16bit OS, arg picking will be by 16 bits pieces.
if it's a 32bit OS, arg picking will be by 32 bits pieces.
if it's a 64bit OS, arg picking will be by 64 bits pieces.
if it's a 128bit OS, arg picking will be by 128 bits pieces.
if it's a 512bit OS, arg picking will be by 512 bits pieces.
...
that's all.
And in order to make portable I have a #define SYSBITS __int32
BTW: for some of you that wished for CodeProject irc server
I create a channle on DalNet called "#CodeProject "
|
|
|
|
|
on a 32bit OS you'll have a little problem getting the __int64 value
Not only that. double numbers will be more serious problem.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
well to got the 64 bits value (e.g. __int64 or double) we do it like this:
(*** lets say we're working on a 32bit OS ***)
in the .h file:
#define GetParam(arg,num) (((int *)(&arg))[num])
func1(const char *lll, ...);
The arguments come in 32 bits pieces.
There for the 64bits variable will come in 2 pieces (64/32=2).
and we will get the value like this
func1(const char *lll, ...)
{
__int64 l_nNumber;
int pos=0;
((__int32 *)&l_nNumber)[0]= GetParam(lll, ++pos);
((__int32 *)&l_nNumber)[1]= GetParam(lll, ++pos);
}
BTW: for some of you that wished for CodeProject irc server
I create a channle on DalNet called "#CodeProject "
|
|
|
|
|
1) Do you think it's better than va_xxx?
2) Do you think this solves the original poster's problem?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
1) what is the "original poster's problem"?
2) I have no problem with it, as a matter of fact it works perfect.
BTW: for some of you that wished for CodeProject irc server
I create a channle on DalNet called "#CodeProject "
|
|
|
|
|
what is the "original poster's problem"?
He wanted to pass va_list from one function that takes a variable number of arguments to another function. Your macros do not solve this problem.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
thanks for the answers guys!
|
|
|
|
|
How to register a window class exactly the same as the "View" window except the backcolor in a MDI/SDI application?
Thanks.
Maer
|
|
|
|
|
Handle OnEraseBackground to change the background colour if that's all you want to change. I don't believe you can change it by creating a Window class ( although I could be wrong ). Full instructions are in the FAQ.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
You *can* control the background color in a view by creating a Window class. See TN001 in MSDN Library.
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
What means ATOM?
Thanks.
Maer
|
|
|
|
|
VC help -> Contents -> Platform SDK -> Base Services -> Interprocess Communications -> Atoms
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi, Sowinski!
Thanks for your reply.
It helps a lot.
Best regards,
Maer
|
|
|
|