|
Check out MSDN.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/file_management_functions.asp
Kuphryn
|
|
|
|
|
The MFC doesn't have a method that will manipulate versions. Most other file attributes are accessible but the version is not accessible via the built-in functions. Has anyone else tackled this problem?
|
|
|
|
|
|
|
|
|
I want to shutdown a networked windows 98 computer using the application. How can i do this?
|
|
|
|
|
|
Hello people,
I try to create a little game on my own with VC++6.0.
In a sample, that I loaded from this website, is the header 'dxerr8.h' needed.
Where can I get it?
|
|
|
|
|
|
|
It works ! )
Thank you very much
|
|
|
|
|
Dear all:
I'm writing a com which will be accessed in asp using vc++.I'm not familiar with atl,so mfc is my only choice.I'm a beginner,so I do it step by step.I used appwizard to create a standard mfc dll with automation enabled.I created a new class CMyobj which inherited from CCmdtarget.The automation option I selected for CMyobj is createable by type id.Now I add a method
BSTR GetNameById(LPCTSTR ID)
My first question is if I can call this method directly in ASP like this:
DIM OBJ
DIM ID
DIM Name
obj = server.createobject("Myobj")
Name= obj.GetNameById(ID)
If I can't,what else should I code.(I am a step by step)
I also waht to add a method to return one(or more) recordset(s).How to declare the parameter type for recordset.My declaration is
LPDISPATCH GetNameByDept(long dept)
In the implimentation of this method,I create a recordset,retrieve the data,cast the recordset to (IDISPATCH *).The code is like this:
_Recordsetptr pRs;
pRs->createinstance(__uuidof(recordset))
....
pRs->open(sql,connection_string,...)
return (IDISPATCH *)pRs->Detach()
I create a c++ client and call the method like this:
_Recordsetptr pRs;
long deptid;
pRs = IObjinterface->GetNameByDept(deptid)
It works in c++.But i think it may be a little lucky.It doesn't work in asp.Asp code may be like this:
dim rs
dim obj
dim dept
set rs=server.createobject('adodb.recordset')
set obj=server.createobject('myobj')
rs=obj.GetNameByDept(dept)
rs.open
....
set rs=nothing
set obj=nothing
Can somebody give me some help?example codes,articles,urls or books.
|
|
|
|
|
I recommend these books on COM and ATL.
Inside COM (Programming Series) by Dale Rogerson
Developer's Workshop to COM and ATL 3.0 by Andrew Troelsen
Kuphryn
|
|
|
|
|
Hi everyone!
Is there anyone that has implement a multicast program on c++, that join a multicast group.
When it had join a group it will logg traffic and saves it in a circular buffer.
But first I will have some help with joining a multicast group.
Please help me,
Stefan
|
|
|
|
|
|
Code to Join:
<br />
struct ip_mreq mreq;<br />
{<br />
struct in_addr imr_multiaddr;
struct in_addr imr_interface;
}<br />
<br />
#define RECV_IP_ADDR "225.6.7.8" // An arbitrary multicast address<br />
<br />
mreq.imr_multiaddr.s_addr = inet_addr(RECV_IP_ADDR);<br />
mreq.imr_interface.s_addr = INADDR_ANY;<br />
err = setsockopt(<br />
sock, <br />
IPPROTO_IP,<br />
IP_ADD_MEMBERSHIP,<br />
(char*)&mreq, <br />
sizeof(mreq));<br />
<br />
Igor Proskuriakov
|
|
|
|
|
I read the following text in the book:
Declaring member functions inside aclass definition
And defining those member functions outside that class definition
Seperates the interface of a class from its implementation.
Clients of a class cannot see the implementation of that class' member
Functions and need not recompile if that implementation changes.
I don't understand the concept of the text and I want to know
Why don't the clients of the class need to recompile if they don't
See the implementation of that class' member functions?
|
|
|
|
|
The declarations for a class are what is normally contained in the header file for the class, for example:
class Calculator
{
public:
Calculator();
~Calculator();
float Sqrt(float i);
}
The defintions of the functions are contained in the .cpp file for the class. A client of the class only needs to include the header file for the class with the declarations of the members. It doesn't need to know how the members are implemented, it just needs their declarations. In the .cpp you can implement the members however you like, and change the implementation as much as you like without needing to recompile the clinet code. The client code only requires recompilation if the declarations in the header file change.
|
|
|
|
|
Hi,
I read in a book on COM that COM is language independent viz. you can create and use COM components in any language. I was wondering how do I go about using a COM component (created in VC++) in a Java client program?
Thanks,
Melwyn
|
|
|
|
|
There is a Sun-approved way, which is to create a native interface that implements the COM interface, and create a DLL with JNI that implements the native interface using the COM object. This will work with any modern JVM. Microsoft's JVM (which I don't think is supported any longer) had another way, which I don't recall the details of, that let you use a COM object directly from Java.
|
|
|
|
|
Hi,
Thank you for your reply.
That solved my doubt as far as using a COM component is concerned.
How about creating a COM component in Java? Books on COM say that you can creat a COM component in any language....even COBOL!!!
I suspect as usual Microsoft people make statements they can't back up.
Thanks,
Melwyn
|
|
|
|
|
Again, there is a Microsoft JVM-specific way which is (supposed to be) simple--
and the JNI way, in which case you create a C/C++ COM wrapper for your Java object. The wrapper would incorporate the JVM and call it to process COM requests in your Java object.
|
|
|
|
|
Hi!
What's the best method to wait for an application, that has been launched using the ShellExecute function, to terminate?
My application outputs something to a HTML file and opens it using the ShellExecute function with 'print' as open operation. ShellExecute returns me an instance handle. Now I want to wait until the application has finished printing and delete the temporary file.
Thanks in advance
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Hi Dominik,
Altough you can get a handle to the process launched with ShellExecuteEx , the aproach is not very robust as the MSDN documentation explains.
Maybe the following can do what you want: Create the temporary file using CreateFile with FILE_SHARE_READ and FILE_FLAG_DELETE_ON_CLOSE , and keep it open while you invoke ShellExecute ; after some safeguard time close the file: if printing already finished, the file will automatically get destroyed; if printing is underwy, the file will get destroyed when printing is done.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|