|
Under IOCTL_DISK_UPDATE_PROPERTIES, how can I find the library or header files?
On Visual C++ 6.0, how to I identify a user who is having what kind of privileges? (i.e admin privilege, etc)
|
|
|
|
|
max_gundam15 wrote:
Under IOCTL_DISK_UPDATE_PROPERTIES, how can I find the library or header files?
This is found in winioctl.h .
max_gundam15 wrote:
On Visual C++ 6.0, how to I identify a user who is having what kind of privileges? (i.e admin privilege, etc)
This question is a bit vague, but does NetUserGetInfo() do what you require?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hello all,
I am stuck at a problem where I am supposed to communicate with a telephone using a modem. I am using the API functions of CreateFile, ReadFile, and WriteFile for this purpose. I need to send phone pulses to the other end and receive pulses from the other end. I have managed to establish connection and send pulses to the remote telephone but I cannot receive the pulses the remote telephone is sending me. Is there a special modem command for this? Do I need a special setting? Help, I am stuck!
|
|
|
|
|
You should use TAPI (Telephony API) instead of Win32 CreateFile . See Visual Studio docs or MSDN for a reference and examples. TAPI is installed with Platform SDK, so it comes bundled with most Visual Studio distributions, and/or you can download it from the Internet as well.
TAPI has a function pair called lineGenerateDigits and lineGatherDigits that generate and gather pulse sequences that represent numbers. You can also send and monitor individual pulses with lineGenerateTone and lineMonitorTone .
These functions only exists in TAPI version 2.x. In version 3.x, the COM model is introduced, and everything running on the phone line is considered a stream, with terminal objects acting as sinks. For your case, I suggest TAPI 2.x, if possible. The COM model is too complex for the functionality you require.
-Antti Keskinen
----------------------------------------------
"If we wrote a report stating we saw a jet fighter with a howitzer, who's going to believe us ?"
-- R.A.F. pilot quote on seeing a Me 262 armed with a 50mm Mauser cannon.
|
|
|
|
|
thanks
|
|
|
|
|
31, 28 (29), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
modified 12-Sep-18 21:01pm.
|
|
|
|
|
How can I implement timer in in Windows (2000/XP )with resolution of 1 milisecond
or better. Multimedia timer seems to be not accurate enough, but may be I am not using it right?
Thanks
DavidR
|
|
|
|
|
|
Bear in mind that although you can use QueryPerformanceCounter() to get an accurate elapsed time, you *cannot* get things to happen regularly at for example 1ms intervals.
Windows has an internal "clock" of (from memory) 12.5ms, and doing anything more often than that (reliably) just doesn't work.
using System.Beer;
|
|
|
|
|
Jon Hulatt wrote:
Windows has an internal "clock" of (from memory) 12.5ms...
Close. For Windows 9x/Me, the system clock ticks at 55 ms. For Windows NT, it ticks at 10 ms. This is the best that can be obtained with a non-RTOS system.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I am trying to read from a CFile object using CArchive and an overridden Serialize Function for a CObject derived object.
My problem is that how do i traverse through all the objects in the file with the Serialize function, and come to know that the end of file has been reached.
|
|
|
|
|
Can any one tell me how to add 'OK' AND 'CANCEL' button to modeless propertysheet just like the model one?
Lisoft
|
|
|
|
|
Keeping it as simple as possible, I need to add the support for crystal reports 8.5 and 10.0 in my application depending on which version is installed on the clients PC.
..RR..
|
|
|
|
|
hi
you already posted this msg, right? i have given the reply there.
|
|
|
|
|
Hi,
I'm trying to custom draw a list control. I'm also using it as a virtual list supplying data handling the LVN_GETDISPINFO message. I've handled the NM_CUSTOMDRAW to custom draw only specific Items the problem is the iSubItem variable in the LPNMLVCUSTOMDRAW structure is always zero when I'm expecting it to change. I'm depending on it to idententify which item / subitem it is currently drawing. this I'm doing when dwDrawStage == CDDS_ITEMPREPAINT. am i doing something wrong here. I've seen a sample application XListCtrl in this site which seems to work. am i doing something wrong here. please give me directions as to how to resolve this problem. thanks in advance.
|
|
|
|
|
I'm working on a filter funtion which filters the items in the list control. The items that I inserted into the list control have three attributes which is "creation time", "readed or not" and "item color"(because these attribute are specific to me, so I generalized them a little). what I'm trying to accomplish is to filter what appears in the list control according these three attribute of each item.
I'v got three comboboxs as the user interface which is according to the three attributes. They have the following content.
"creation time" combobox "readed or not" combobox "item color"
->today ->all ->red
->recent 3 days ->readed ->green
->recent week ->not readed ->black
->recent month
->all time
I am not famaliar with algorithm, but I am sure with algorithm I can come up with a very concise and clear flitering logic.But now I just trying to solve the problem too;)!
Can anybody provide a pseudo code or simple algorithm?
thanks!
|
|
|
|
|
Here is a generalization:
PopulateListControl()
{
date = value from "creation time" combobox
read = value from "read or not" combobox
color = value from "color" combobox
for (int x = 0; x < number_of_items; x++)
{
if (item.date == date && item.read == read && item.color == color)
insert item into list control
}
} Does this make sense?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I have ploted a figure in a static or edit or any region. But I do not know how to save it in .jpeg,.bmp...file. Please help me in this trouble! thank you very much!
|
|
|
|
|
Hi there,
It's been years since I done serious C++ programming and I am rusty on STL and templates and I need a quick solution for the following issue:
I need to define some kind of policies based on user input, for instance:
- some processes should handle requests that start with letter 'A' - say
this is policy_1 (and is derived from unary_function<string, bool=""> ?!)
- the reminder of the processes should handle all the other requests -say
this is policy_2, which is the negation of policy_1-
The processes are stored in a vector, each process object has a reference
to its policy
References/pointers to policies are stored in a vector (so policy_1 and policy_2 have to be siblings from a common base class: unary_function<string, bool=""> ?!)
When a request is fired I need to:
- find appropriate policy in the policies vector
- in the processes vector find the least loaded process among those
which have a reference to the policy found in the previous step
So the question is how do I create a stand alone policy object that is the negation of policy_1 ?
Thanks,
Rick.
|
|
|
|
|
I hope anyone can help me..
Do I have to learn how to write a windows driver(W2K) to make programs works in the kernel mode...
plz if u have any resources about the kernel mode programming ..infrom me and thx
bye
|
|
|
|
|
you can go through the book of undocumented windows 2000 secrets by sven b.schreiber. there are plenty of books available in the market. U better search in the net and buy the books that u like. you can search for the amazon.com for the book titles.
naren
|
|
|
|
|
Pretty much. There are tricks that might let admin into kernel mode, but other than device drivers you shouldn't need kernel mode. (if anyone other than admin can get into kernel mode it is a bug)
What are you trying to do? If you just want to learn kernel mode programing as windows does it, then your best bet is to get the kernel for reactos and hack on that. (or if you want a kernel that is more useable, linux/BSD)
|
|
|
|
|
Hello,
In my CWinApp() derived class, I tried to handle the ID_FILE_OPEN message (using VC++.net's properties pane, but putting a breakpoint in the code shows that it never goes there. What gives?
My intent is to use a different doc/view template than the first one on the list.
thanks,
JennyP
|
|
|
|
|
Hi,
I have a program developed on Windows 2000 with the following properties:
1. It is an MFC Appwizard generated MDI application
2. Links to a COM server that I wrote
3. Links to 2 ActiveX Controls that I use for displaying graphics
4. Links to 2 dll's that basically have functions that communicate with the serial port
5. Is multi-threaded, I create my threads using the Win32 API ::CreateThread().
I have tested this program on Windows XP and Windows 2000 and it runs on these platforms without a hitch. However, when I use this program on Windows 98, my program crashes in many places. I deploy my program using Windows Installer so that my COM Server and ActiveX Controls are automatically registered for me, and on Win98 it seems that the program can successfully talk to the COM Server and use the ActiveX Controls.
I am wondering if anyone has experience developing applications that work with all of XP,2k and 98 and can tell me what would cause my program to crash on Win98? Will a re-compile with optimizations on a Windows 98 machine fix it? Or will it have no effect at all? I would also like to point out that the Windows 98 machine is slower and has less ram. Sometimes I get the out of hdd space warning too. Could this cause my program to crash?
Thanks in advance!
|
|
|
|
|
Things that come to mind from your description:
* Don't use CreateThread() to create threads, use AfxBeginThread() if the thread contains MFC code, or _beginthreadex() otherwise.
* Make sure your graphics drawing code cleans up GDI objects properly everywhere. Win 9x has 16-bit limitations in GDI, it's very easy to exhaust an internal 64K heap if you leak GDI objects (pens, brushes, etc).
* Does your serial port code work on 9x in the first place? Hardware access is radically different between 9x and NT.
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb
|
|
|
|