|
Hi
I just read the article about how to add a deskband to the InternetExplorer.
But this is not the thing I want to do.
I just want to add a button to the IE-Toolbar (e.g. like the downloadmanager "FlashGet" does)
I want ti execute my own code when the user clicks on this button (i.e. open a diaog-box or similiar things)
How can I achieve this?
thanks in advance
|
|
|
|
|
Is it possible to create, open, use, close and delete a FILE in memory, without flushing to disk?
|
|
|
|
|
i don't think so. but if you use Windows HANDLEs (CreateFile and friends) you can use memory or file based I/O transparently.
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
Maybe the only way is the FILE_ATTRIBUTE_TEMPORARY flag; probably the same than tmpfile() .
How long can I keep the file open before the OS flushes?
|
|
|
|
|
How can I read from a file?
for Example I have a file = test.txt
and than... I have a string
and now I want that the text from my test.txt file be copied in my String;
how can I do this?
is this the right way?
CString str;
CFile file("test.txt", CFile::modeRead);
file.Read( ... and then?
MessageBox(str); // to se what is in the test.txt
|
|
|
|
|
Go and buy a book about the C/C++ programming language.
|
|
|
|
|
If it's just a text file try using CStdioFile and calling the method ReadString
CString str;
CStdioFile file("test.txt", CFile::modeRead);
file.ReadString(str);
MessageBox(str);
Michael
|
|
|
|
|
thank you!
|
|
|
|
|
What is the best way to handle BLOB in automation interface? IStream seems to be a good candidate, anything different?
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!
|
|
|
|
|
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
|
|
|
|