|
...
modified on Tuesday, July 8, 2008 2:50 PM
|
|
|
|
|
Are you chinese?
Luyuguo(hz_luyg@hotmail.com)
|
|
|
|
|
Hi.
"By default, the installed service will be started automatically when you reboot the computer."
Is there any way to make the service start, by default (without going to the Administrative Tools), after we install it?
It might be changing this (in the code):
SERVICE_AUTO_START, /* start type */
to?
|
|
|
|
|
Hello,
I'm a computer engineer in my final year of studies, hopefully graduating in a couple of months. I'm developing a peer-to-peer application for my fyp, and i'm gonna use ur tcp component to establish the upload/download operations.
The explanation is really clear. There's one point i didn't get though, when u say that the different handlers (Exception, ConnectionFilter and Messages) should be thread-safe. What about it?
I'm not much of a thread user, and i'm keen on having a cleanly working p2p app with no flaws on the socket level.
Thanx for ur component, it came really in handy,
Paul Naggear
Saint Joseph University
Beyrouth, Lebanon
|
|
|
|
|
First of all, you can read about Thread Safety[^], then get familiar with classes in the System.Threading name space.
Good luck with your project.
|
|
|
|
|
Allright thanks i will.
I've tried using your component but i'm having a problem on the client side.
The server is able to receive and send messages (StringData), but the client is not receiving anything.
Basically, i've copied your test example from the website and split it in two parts, one server and the other one client.
Best regards,
Paul
|
|
|
|
|
Thank you for the informative article and source code. Is there any license or usage terms associated with the use of your XYDispDriver source code?
|
|
|
|
|
I am trying to use XYDispDriver on a StoryRanges collection IDispatch from the MS Word object model. Specifically I do
VARIANT *pStoryRanges = XYDocument.GetProperty("StoryRanges");
if (pStoryRanges == NULL || pStoryRanges->vt != VT_DISPATCH || pStoryRanges->pdispVal == NULL)
return -1;
pStoryRanges->pdispVal->AddRef();
XYDispDriver XYStoryRanges;
XYStoryRanges.Attach(pStoryRanges->pdispVal);
for (long i=Word2007::wdMainTextStory; i<=Word2007::wdEndnoteContinuationNoticeStory; i++)
{
VARIANT *pStoryRange = XYStoryRanges.InvokeMethod("Item", i);
if (pStoryRange == NULL || pStoryRange->vt != VT_DISPATCH || pStoryRange->pdispVal == NULL)
return -1;
}
In the above block of code, the XYStoryRanges.InvokeMethod("Item", i) always returns an Empty. Stepping down into the InvokeMethodV(), I can see that the pArg-> for the single arg "i" is set to 29 or USERDEFINED and there is no case for USERDEFINED in your switch block, so you end up ignoring the arg and the return value from the m_pDisp->Invoke() is
m_hRet 0x80020008 Bad variable type. HRESULT
Do you expect that? Do you have a suggestion for how best to use XYDispDriver to access items from a collection? Should I subclass XYDispDriver and add an Item() method which will do the right marshaling of the index arg?
|
|
|
|
|
|
I have two questions on syncronization:
A.
1.Can process A call SendSyncTextMsg to process B
2.Before B replies to A, B calls SendSyncTextMsg to process C
3. C in this case is XYRoot.
Is this possible? Will it result in gridlock?
B.
1. Can process A call SendSyncTextMsg to process C
2. Before C replies to A
3. Process B calls SendSyncTextMsg to process C as well
Will this result in gridlock?
Thanks!
|
|
|
|
|
No, there won't be any gridlock in both cases.
If A calls SendSyncTextMsg to B and B is busy doing something else, the call will timeout at most. This will happen no matter how they were connected together.
The question is, if A and B are calling SendSyncTextMsg to each other, how is it possible that they can replay to each other and not causing timeout?
The answer is, when a message arrives, the message handler will be invoked. If you wrote the message handler so that it replies to an incoming message, then the handler will be invoked even if you are in the middle of calling SendSyncTextMsg!
This is because when XYMessenger is waiting for a reply to a SendSyncTextMsg call, it can processe other incoming messages, and it can also forward messages between two other XYMessenger objects.
Now it should be clear that if A is waiting for a reply to SendSyncTextMsg call, other XYMessenger objects connected via A will not be stuck because A can still forward messages from one node to the other.
Hope this helps.
My articles and software tools
|
|
|
|
|
It sounds like there should not be gridlock but my program hangs on SendSyncTextMsg
In regards to problem A:
A. Process A sends SendSyncTextMsg to B. Before B replies (using ReplySyncTextMsg) to A, B calls SendSyncTextMsg to process C.
At this porint B hangs.
process B = XYAdmin
process C = XYRoot (java)
Process A is trying to tell process B to add a user. B then tells process C (XYRoot).
I have tested this without process A, with process B attempting to add a user directly. It works fine. With process A, process B hangs when it calls process C (java XYRoot).
|
|
|
|
|
If you call SendSyncTextMsg to XYAdmin and XYRoot, you will not get any reply unless the message is one of the few documented in the help files. XYAdmin and XYRoot will disregard and delete any message they don't want to process.
If you post your code (the sending part), I will take a look.
My articles and software tools
|
|
|
|
|
[Process A] Process A requests B to add a user to Process C(XYRoot).
int retMsg =0;
string reciever = getUser(MANAGER); //reciever get the value XYAdmin@XXX
string message = name + DELIM + password;
if ( (retMsg = xy.SendSyncTextMsg(reciever, TITLE,message, ADD_USER_MSGID,TIME_OUT_SEC)) > -1 )
{...}
[Process B] B is the "MANAGER" and logged in as XYAdmin@XXX
private int sendXyRootMessage(String title, String message, int appId,boolean isSave)
{
// using debugger
// title= "<xyconnect><xyuser>Spot<xypassword>p"
// message = ""
// appId = -2000000001
String strTo = _xySocket.GetParent(); // Using debugger strTo = "XYRoot@"
int reply = _xySocket.SendSyncTextMsg(strTo,title,message,appId,60);
// hangs here. reply is -1 after timeout
int index = _xySocket.GetMsgIndexWithSenderMsgID(reply);
[Process C] is your XYRoot java utility
A is asking B to add a user to C (XYRoot). This is done since only the XYAdmin can add users.
I tried another scenario with A not in the picture. B can add a user to C without any problems when A is not connected at all.
I tried a third scenario where A uses SendTextMsg instead of SendSyncTextMsg and Process B hangs at the same spot.
Maybe this isn't an issue of communication but some caveats that apply to being logged in as XYAdmin and XYRoot? Process A and B(XYAdmin) both connect to C (XYRoot) as clients. A then requests B to add a user to C.
|
|
|
|
|
the "title" field came out wrong in the above message because of the html on this site.
Here it is again:
title = "<XYConnect><XYUser>spot</XYUser><XYPassword>p</XYPassword></XYConnect>"
Thanks!
|
|
|
|
|
I got it to work!
I changed the communication tree layout.
Process B connects to C (XYROOT) as a client
Process A connects to B as a client.
before it was:
Process A and B were clients to process C
Why does it only work this way??
Thanks
|
|
|
|
|
Hi There,
Is it possible to disable XYNTService logging?
Thanks,
Shibu
|
|
|
|
|
You need to comment out what the WriteLog function does and recompile the code. Or you can add a configuration setting that allows disabling log at run-time.
Good luck.
My articles and software tools
|
|
|
|
|
Hi .
First i would like to thank you for your articles it help me a lot.
Wile trying to use your XYSoapClient.dll ,
if every thing is ok than it is working all right.
but when i try to rase exception like a wrong MethodName
then i get a Soap error print on my crt which does not explain the error
SOAP error:
(null)
only when setting the .... #define XYDISPDRIVER_DEBUG
i get the print messages on my screen but not getting it back to the XYSoapClientApp
so maybe you can add a check for GetIDsOfNames for the MethodName
and throw your own exception
or lean on the system exception and return the Exception->GetErrorMessage
any way right now i think it is not clear what is the Soap error.
thank's ... avner
|
|
|
|
|
|
Hi,
I tried opening the downloaded source code for 'Notification Service' but could not view it in vs.net 2003. Please suggest!
Thanks
Ashu Sharma
|
|
|
|
|
|
I tried using the DLL from your above article. Installed the xyrunproc OK on MS-SQL 2k. Whenever I try and use it, I get "unable to load DLL or a DLL it references" type message. I did not have Framework on the server (W2K Server) but installing framework 1.1 did not fix the problem.
I would LOVE to be able to use this DLL.
John Griffiths
Perth Australia
|
|
|
|
|
You can open the dll in depends.exe to see exactly what dlls it depeneds on. The tool should tell you what is missing on your system. Good luck.
My articles and software tools
|
|
|
|
|
Hi
I did this program by using administrator privilege and it worked.
Is it possible to do so, by using low level user.
So other users who r not administrator can also run their own process
thanks
|
|
|
|