Hi all. This is my changes :)
serialui - Started serialui dll - Implemented drvCommConfigDialogA and drvCommConfigDialogW
kernel32.diff - Implemented CommConfigDialogA and CommConfigDialogW - Removed @unimplemented comments for some implemented functions
include.diff - Add missing ioctls to ntddser.h: IOCTL_SERIAL_GET_COMMCONFIG and IOCTL_SERIAL_SET_COMMCONFIG
btw. Screenshot is here: http://www.ljplus.ru/img2/drg4njubas/commdlg.JPG
Saveliy Tretiakov a écrit :
serialui
- Started serialui dll
- Implemented drvCommConfigDialogA and drvCommConfigDialogW
http://reactos.com:8080/pipermail/ros-svn/2005-April/002164.html
kernel32.diff
- Implemented CommConfigDialogA and CommConfigDialogW
- Removed @unimplemented comments for some implemented functions
Not committed because they give warnings: misc/comm.c: In function `CommConfigDialogA': misc/comm.c:854: warning: use of cast expressions as lvalues is deprecated misc/comm.c: In function `CommConfigDialogW': misc/comm.c:887: warning: use of cast expressions as lvalues is deprecated MAKE: *** [misc/comm.o] Error 1
include.diff
- Add missing ioctls to ntddser.h: IOCTL_SERIAL_GET_COMMCONFIG and IOCTL_SERIAL_SET_COMMCONFIG
They are not documented by Microsoft (see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/serial/hh/s... ) and googling on them doesn't give good results. Do you have some documentation?
Hervé Poussineau wrote:
Not committed because they give warnings: misc/comm.c: In function `CommConfigDialogA': misc/comm.c:854: warning: use of cast expressions as lvalues is deprecated misc/comm.c: In function `CommConfigDialogW': misc/comm.c:887: warning: use of cast expressions as lvalues is deprecated MAKE: *** [misc/comm.o] Error 1
Hmm, my compiler(gcc 3.3.3) didn't return any warnings. I will fix them tomorrow.
include.diff
- Add missing ioctls to ntddser.h: IOCTL_SERIAL_GET_COMMCONFIG and IOCTL_SERIAL_SET_COMMCONFIG
They are not documented by Microsoft (see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/serial/hh/s... ) and googling on them doesn't give good results. Do you have some documentation?
I didn't know they are not documented :) You can find this ioctls defined in microsoft's ntddser.h. They are used to acess SERIALCONFIG structure. I need this to implement GetCommConfig and SetCommConfig apis. The SERIALCONFIG structure is undocumented too. So what? Maybe remove it from our ntddser.h? :)
Hervé Poussineau wrote:
Saveliy Tretiakov a écrit :
serialui
- Started serialui dll
- Implemented drvCommConfigDialogA and drvCommConfigDialogW
http://reactos.com:8080/pipermail/ros-svn/2005-April/002164.html
I just noticed wine also has a serialui.dll implementation. Is there a reason why Saveliy reinvented the wheel?
Best Regards, Thomas
Thomas Weidenmueller wrote:
I just noticed wine also has a serialui.dll implementation. Is there a reason why Saveliy reinvented the wheel?
serialui.dll from wine is not implemented correctly. Almost all code from there needs a rewrite\remove and can't be included into reactos. It was more simple for me to reimplement it from scratch.
Hi! How could I miss this! I guess I was asleep!
Saveliy Tretiakov wrote:
Hi all. This is my changes :)
serialui
- Started serialui dll
- Implemented drvCommConfigDialogA and drvCommConfigDialogW
kernel32.diff
- Implemented CommConfigDialogA and CommConfigDialogW
- Removed @unimplemented comments for some implemented functions
include.diff
- Add missing ioctls to ntddser.h: IOCTL_SERIAL_GET_COMMCONFIG and IOCTL_SERIAL_SET_COMMCONFIG
btw. Screenshot is here: http://www.ljplus.ru/img2/drg4njubas/commdlg.JPG
You can attach graphic files, it's okay. How do you call up the config menu?
Thanks, James
James Tabor wrote:
Hi! How could I miss this! I guess I was asleep!
Saveliy Tretiakov wrote:
Hi all. This is my changes :)
serialui
- Started serialui dll
- Implemented drvCommConfigDialogA and drvCommConfigDialogW
kernel32.diff
- Implemented CommConfigDialogA and CommConfigDialogW
- Removed @unimplemented comments for some implemented functions
include.diff
- Add missing ioctls to ntddser.h: IOCTL_SERIAL_GET_COMMCONFIG and IOCTL_SERIAL_SET_COMMCONFIG
btw. Screenshot is here: http://www.ljplus.ru/img2/drg4njubas/commdlg.JPG
You can attach graphic files, it's okay. How do you call up the config menu?
As documented in the platform SDK?
Best Regards, Thomas
James Tabor wrote:
How do you call up the config menu?
kernel32 loads serialui.dll and calls drvCommConfigDialog.
Thomas Weidenmueller wrote:
As documented in the platform SDK?
It seems to me that it is not documented in platform SDK. But I"ve tested my dll in windows environment and it worked.
From platform SDK:
Remarks The *CommConfigDialog* function requires a dynamic-link library (DLL) provided by the communications hardware vendor.
Saveliy Tretiakov wrote:
It seems to me that it is not documented in platform SDK. But I"ve tested my dll in windows environment and it worked.
I thought you meant CommConfigDialog. Btw i tried calling drvCommConfigDialogA in WinXP and it returned ERROR_CALL_NOT_IMPLEMENTED. So the return type is definitely not a BOOL but rather a DWORD returning a win32 error code (or 0 for success).
Best Regards, Thomas
Thomas Weidenmueller wrote:
I thought you meant CommConfigDialog. Btw i tried calling drvCommConfigDialogA in WinXP and it returned ERROR_CALL_NOT_IMPLEMENTED. So the return type is definitely not a BOOL but rather a DWORD returning a win32 error code (or 0 for success).
Maybe this is because you pressed cancel button and ERROR_CALL_NOT_IMPLEMENTED was set somewhere else? It returns FALSE when cancel button is pressed.
From CommConfig dialog description: If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call *GetLastError*.
I think drvCommConfigDialog should return the same. Maybe adding SetLastError(ERROR_CANCELLED) and SetLastError(ERROR_SUCCESS) will solve the problem?
Saveliy Tretiakov wrote:
Maybe this is because you pressed cancel button and ERROR_CALL_NOT_IMPLEMENTED was set somewhere else? It returns FALSE when cancel button is pressed.
no, in my copy of win XP calling drvCommConfigDialogA always returns ERROR_CALL_NOT_IMPLEMENTED. Calling the unicode version works, it returns FALSE/0/ERROR_SUCCESS or ERROR_CANCELLED when correct parameters are passed to it.
From CommConfig dialog description: If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call *GetLastError*.
I'm talking about drvCommConfigDialog, not CommConfig. However CommConfig calls drvCommConfigDialog, which appears to return ERROR_SUCCESS, ERROR_CANCELLED or another win32 error code, which is not a BOOL.
I think drvCommConfigDialog should return the same.
As i mentioned above, it appears to return a win32 error code, not a BOOL in windows XP, which leads to the conclusion that drvCommConfigDialog doesn't have the exact same prototype as CommConfig.
Maybe adding SetLastError(ERROR_CANCELLED) and SetLastError(ERROR_SUCCESS) will solve the problem?
I propose only CommConfig should set the last error, if drvCommConfigDialog didn't return ERROR_SUCCESS or ERROR_CANCELLED. Then returning TRUE from CommConfig when drvCommConfigDialog returned ERROR_SUCCESS and returning FALSE in all other cases should implement it correctly. Instead of setting the last error code in drvCommConfigDialog, the function should return it directly.
Best Regards, Thomas
Ok, thank you. These patches correct return values.
Thomas Weidenmueller wrote:
Saveliy Tretiakov wrote:
Maybe this is because you pressed cancel button and ERROR_CALL_NOT_IMPLEMENTED was set somewhere else? It returns FALSE when cancel button is pressed.
no, in my copy of win XP calling drvCommConfigDialogA always returns ERROR_CALL_NOT_IMPLEMENTED. Calling the unicode version works, it returns FALSE/0/ERROR_SUCCESS or ERROR_CANCELLED when correct parameters are passed to it.
From CommConfig dialog description: If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call *GetLastError*.
I'm talking about drvCommConfigDialog, not CommConfig. However CommConfig calls drvCommConfigDialog, which appears to return ERROR_SUCCESS, ERROR_CANCELLED or another win32 error code, which is not a BOOL.
I think drvCommConfigDialog should return the same.
As i mentioned above, it appears to return a win32 error code, not a BOOL in windows XP, which leads to the conclusion that drvCommConfigDialog doesn't have the exact same prototype as CommConfig.
Maybe adding SetLastError(ERROR_CANCELLED) and SetLastError(ERROR_SUCCESS) will solve the problem?
I propose only CommConfig should set the last error, if drvCommConfigDialog didn't return ERROR_SUCCESS or ERROR_CANCELLED. Then returning TRUE from CommConfig when drvCommConfigDialog returned ERROR_SUCCESS and returning FALSE in all other cases should implement it correctly. Instead of setting the last error code in drvCommConfigDialog, the function should return it directly.
Best Regards, Thomas _______________________________________________ Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev