Unable to read stack element of the CoD2 script engine in C

Hi,
I am trying to get extensions for Call of Duty 2 binary working for Arch Linux. I am running x86-64 arch (3.11.2-1-ARCH) and CoD2 is 32bit. That is why i am using the multilib. It gets preloaded with LD_PRELOAD.
But on Arch it doesn't read the stack element of the CoD2 script engine:
// My COD_VERSION is COD2_1_3
int getStack()
#if COD_VERSION == COD2_1_2
return 0x83D7A10; // diff to 1.3: 1080
#elif COD_VERSION == COD2_1_3
return 0x83D8A90;
#elif COD_VERSION == COD1_1_5
return 0x0830AE88;
#elif COD_VERSION == COD4_1_7
return 0x08c055b0;
#else
#warning int getStack() return NULL;
return NULL;
#endif
int stackGetParamInt(int param, int *value)
//printf("stackGetParamInt() start...");
aStackElement *scriptStack = *(aStackElement**)getStack();
aStackElement *arg = scriptStack - param;
printf("scriptengine> test value=%.8x scriptStack=%.8x arg=%.8x\n", value, scriptStack, arg);
if (arg->type != STACK_INT)
return 0;
*value = (int)arg->offsetData;
//printf("... end\n");
return 1;
It prints: scriptengine> test value=ff805778 scriptStack=00000000 arg=00000000
Source: https://github.com/kungfooman/libcod/
My thread on the support forum for these extensions for CoD2: http://killtube.org/showthread.php?1583 … Arch-Linux

Hi,
I am trying to get extensions for Call of Duty 2 binary working for Arch Linux. I am running x86-64 arch (3.11.2-1-ARCH) and CoD2 is 32bit. That is why i am using the multilib. It gets preloaded with LD_PRELOAD.
But on Arch it doesn't read the stack element of the CoD2 script engine:
// My COD_VERSION is COD2_1_3
int getStack()
#if COD_VERSION == COD2_1_2
return 0x83D7A10; // diff to 1.3: 1080
#elif COD_VERSION == COD2_1_3
return 0x83D8A90;
#elif COD_VERSION == COD1_1_5
return 0x0830AE88;
#elif COD_VERSION == COD4_1_7
return 0x08c055b0;
#else
#warning int getStack() return NULL;
return NULL;
#endif
int stackGetParamInt(int param, int *value)
//printf("stackGetParamInt() start...");
aStackElement *scriptStack = *(aStackElement**)getStack();
aStackElement *arg = scriptStack - param;
printf("scriptengine> test value=%.8x scriptStack=%.8x arg=%.8x\n", value, scriptStack, arg);
if (arg->type != STACK_INT)
return 0;
*value = (int)arg->offsetData;
//printf("... end\n");
return 1;
It prints: scriptengine> test value=ff805778 scriptStack=00000000 arg=00000000
Source: https://github.com/kungfooman/libcod/
My thread on the support forum for these extensions for CoD2: http://killtube.org/showthread.php?1583 … Arch-Linux

Similar Messages

  • Unable read container element in the BO

    Hi
    I have created a new container element in the task and trying to pass the value and read the same value in the bussiness object method
    using the statement   "SWC_GET_ELEMENT CONTAINER 'Classification' l_KLGRU1". I have created the the container element in parameters of the BO method.
    In the task binding I am direclty passing the container value i.e my case
    Classification  = FI
    "SWC_GET_ELEMENT CONTAINER 'Classification' l_KLGRU1".
    But the above statement is not returning the value at all.
    Where am I going wrong....
    Regards,
    Krishna prasad

    This question is going waaaaaayyyy off-topic, sorry about that Krishna. Just a final response from me, pointing people in the right direction if they are not already aware of another great forum.
    There is a debate (see the Coffee Corner forum which I try to read at least a few times a week) going on with respect to technical solutions to reduce the number of repeated questions and questions to which the answer is available on help.sap.com. There are many suggestions already, some of which are:
    forcing a forum search before posting (as when creating customer messages on service.sap.com)
    restricting the number of open questions a user can have
    a solution as in Experts Exchange where asking a question cost you some points, thus encouraging people to find the answers from previous questions and saving their points for a question that they <u>really</u> can't find an answer to
    forcing a period as lurker, i.e. a new member can not post before he has visited the forums X number of days
    Obviously, not all suggestions will be implemented, and not all are desireable. For instance, forcing a period as a lurker can shut out people who have spent 15 days trying to solve a problem on their own before finally deciding to give SDN a try.
    PS: Mike's last name is Pokraka, I had to double-check it quite a few times before I finally could remember it - my variation was Pokarka

  • Unable to read blob attributes in the Asset Filter

    Hi,
    I am unable to read a blob attribute in the Asset Filter using the following code.
    The String attributes work fine.
    Can I get some examples for reading blob attributes in the filter?
    I am using Webcenter Sites 11gr1
    public void filterAsset(IFilterEnvironment env, String filterIdentifier, FTValList filterArguments, IFilterableAssetInstance instance) throws AssetException
    String inputattr = getAttrID(env, filterArguments, ARG_CUSTOM[0]);
    IListBasic ilistbasic = instance.getAttribute(inputattr);
    ilistbasic.getValue("value") // throws No such field exception.. works fine for string attribues
    Thanks,
    Raj

    Hi
    In DTP, Filter there is option to write routine. The last button.
    Here u can write the below code :
    Select <fields> from table into itab.
    Read itab into wa_itab where <condition>.
    If sy_subrc = 0.
         l_t_range-FIELDNAME = ' '. <give ur field name in source>
          l_t_range-sign = 'I'.
          l_t_range-option = 'EQ'.
          l_t_range-low = wa_itab-field.
        APPEND L_T_RANGE.
    endif.

  • Unable to read beyond end of the stream

    I am coding a Training log for a college project and I am getting this error: 
    An unhandled exception of type 'System.IO.EndOfStreamException' occurred in Microsoft.VisualBasic.dll
    Additional information: Unable to read beyond the end of the stream.
    I have no idea where I have went wrong, could anybody please help and explain how what I have done wrong here is my code for the error:
     Private Sub drpRunner_SelectedIndexChanged(sender As Object, e As EventArgs) Handles drpRunner.SelectedIndexChanged
            FileOpen(2, "Training.dat", OpenMode.Random)
            Dim Runner As RunnerRecord
            Dim Value As Integer
            Value = drpRunner.SelectedIndex + 1
            FileGet(2, Runner, Value) 'This is where I get the error
            If drpType.SelectedItem = "Swimming" Then
                txtMilesInput.Text = Runner.MetresSwam
                txtTimeInput.Text = Runner.TimeSwam
                txtSpeedInput.Text = Runner.SpeedSwam
                txtCaloriesInput.Text = Runner.CaloriesSwam
                txtWeightInput.Text = Runner.WeightSwam
            ElseIf drpType.SelectedItem = "Running" Then
                txtMilesInput.Text = Runner.MilesRan
                txtTimeInput.Text = Runner.TimeRan
                txtSpeedInput.Text = Runner.SpeedRan
                txtCaloriesInput.Text = Runner.CaloriesRan
                txtWeightInput.Text = Runner.WeightRan
            ElseIf drpType.SelectedItem = "Cycling" Then
                txtMilesInput.Text = Runner.MilesCycle
                txtTimeInput.Text = Runner.TimeCycle
                txtSpeedInput.Text = Runner.SpeedCycle
                txtCaloriesInput.Text = Runner.CaloriesCycle
                txtWeightInput.Text = Runner.WeightCycle
            Else : MsgBox("Please select your type of training")
            End If
            FileClose(2)
        End Sub
    End Class

    The Training.dat file is empty, if that is what you mean it needs to be to start off with because in my program you need to enter the training information and save it, here is the code to save and it is all used on the same form:
     Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
            Dim RR As RunnerRecord
            FileOpen(2, "Training.dat", OpenMode.Random)
            If drpType.SelectedItem = "Running" Then
                RR.MilesRan = txtMilesInput.Text
                RR.TimeRan = txtTimeInput.Text
                RR.SpeedRan = txtSpeedInput.Text
                RR.CaloriesRan = txtCaloriesInput.Text
                RR.WeightRan = txtWeightInput.Text
            ElseIf drpType.SelectedItem = "Swimming" Then
                RR.MetresSwam = txtMilesInput.Text
                RR.TimeSwam = txtTimeInput.Text
                RR.SpeedSwam = txtSpeedInput.Text
                RR.CaloriesSwam = txtCaloriesInput.Text
                RR.WeightSwam = txtWeightInput.Text
            ElseIf drpType.SelectedItem = "Cycling" Then
                RR.MilesCycle = txtMilesInput.Text
                RR.TimeCycle = txtTimeInput.Text
                RR.SpeedCycle = txtSpeedInput.Text
                RR.CaloriesCycle = txtCaloriesInput.Text
                RR.WeightCycle = txtWeightInput.Text
            End If
            Dim RecordNumber As Integer
            RecordNumber = drpRunner.SelectedIndex + 1
            FilePut(2, RR, RecordNumber)
            FileClose(2)
            MsgBox("Your information has been successfully saved")
        End Sub
    P.S I don't know why I saved the Structure as a different name from the last I just decided to leave it as it is since it was quicker

  • Unable to read usb memory stick + "the disk you inserted was not readable by this computer"

    Hi Everyone,
      Today I was tryign to use a brand new memory stick 8GB-Samsung PNY on my Mac Book Pro. (Mac OSX 10.7.5)
      1. I do not see this drive in the Finder.
       2. Diskutil could detect the drive.
       3. I was trying to put ubuntu image file on the drive from the terminal uitility and I have this error message in a dialog box:
          "the disk you inserted was not readable by this computer"
    4. Clicking on initialize helps me realise that the drive is detected. But I do not have a clue on how to proceed from here. I am new to Mac and its file system formats.
    The same issue happened with my 500GB external Western Digital Hard Drive. I was reading on forums that WD got some issues with Apple is trying to resolve. I expected to not have this road-block with another brand but it happened with my memory stick. Now I was forming an impression that something should be done to external storage devices inorder for me to use them Mac OSX.
    Kindly enlighten me and help overcome this issue.
    Thank You

    Thank You OGELTHORPE.
    I erased the memory stick and formatted to "Mac OS Extended(Journaled)".
    I attempted once again to use the "sudo dd" command from termial trying to copy the Ubuntu image file to the memory stick.
    The operation termainates with the same message
          "the disk you inserted was not readable by this computer"
    The termainal message says some bytes got transffered in so many seconds. It looks like this operation is being terminated in the middle.
    Have any suggestions and work arounds?

  • XSL-FO unable to read special characters from the XML file

    Team,
    please help on issue, when trying to read the text from XML file (Special characters like bullet). It is displaying as Question mark(?) in output in place of bullet..please proved any soultion.

    The "?" signals a character set mismatch issue - http://www.oracle.com/technetwork/database/globalization/nls-lang-099431.html - between client and database software

  • Why am i unable to read pdf files on the internet???

    can anyone help me please??

    [email protected] wrote:
    I have Adobe Reader 10.0.
    Try updating to 10.1.7 or 11.0.3.
    [email protected] wrote:
    I click to get the pdf version and it opens a new tab and I get a blank page.
    Can you try to save it to your local disk instead, and open it from there?
    If that doesn't help, tell us more about your operating system & browser.

  • Cannot find Mobile Add-On Library (NW CE Missing BarCode reader UI Element)

    Hi All,
      Have any of you used NW CE 7.1 SP09 to create Barcode reader mobile web dynpros. In our IDE install we cannot see the Barcode reader UI element on the View - Research has led us to believe that this is available in the "Mobile Add-On Library" which we cannot find. Is the "Mobile Add-On Library" a plug in.
    Interestingly a previous version of NWDS (7.0-I think) shows the barcode reader UI element on the dynpro view, however we have to use the latest version available to us - ie. CE 7.1 SP09...
    Can someone please help?
    Thanks,
    Ashwin
    Edited by: Ashwin Santhanam on May 11, 2010 3:25 PM

    Hi All,
      Have any of you used NW CE 7.1 SP09 to create Barcode reader mobile web dynpros. In our IDE install we cannot see the Barcode reader UI element on the View - Research has led us to believe that this is available in the "Mobile Add-On Library" which we cannot find. Is the "Mobile Add-On Library" a plug in.
    Interestingly a previous version of NWDS (7.0-I think) shows the barcode reader UI element on the dynpro view, however we have to use the latest version available to us - ie. CE 7.1 SP09...
    Can someone please help?
    Thanks,
    Ashwin
    Edited by: Ashwin Santhanam on May 11, 2010 3:25 PM

  • Unable to read PDF attachments past 1st page in iOS4

    I have upgraded to iOS4
    Now I am unable to read PDF attachments past the 1st page.
    I have received a number of suggestions (like resetting the phone) but to no avail.
    Anybody else with the same problem?

    Thanks for the valiant attempt!
    I uninstalled Stanza and hard reset the iPhone (Home+Sleep until the Apple appears)
    I tested a couple of new messages with fresh PDF attachments, and the problem
    did not go away.
    At this point I may have to consider some sort of software corruption with my iOS4
    Regards

  • Reading text elements

    Dear Friends;
    I want to read text elements of a purchase request's lines. Is there a fm or method to read text elements of the relevant lines of a purchase requisition?
    Thx in advance
    Ali

    Hi Please Look into the following sample code.
    Like that you can use the READ_TEXT Function module for your case.
    REPORT  ylsr_read_text_from_std_tcode.
    DATA : w_id        TYPE thead-tdid,        " Text ID of text to be read
           w_name      TYPE thead-tdname,      " Name of text to be read
           w_object    TYPE thead-tdobject,    " Object of text to be read
           w_language  TYPE thead-tdspras.     " Language of text to be read
    DATA: it_tline TYPE TABLE OF tline,
          st_tline TYPE tline.
    w_id = 'F01'.
    w_name = '450000004800010'.
    w_object = 'EKPO'.
    w_language = 'EN'.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        id                      = w_id
        language                = w_language
        name                    = w_name
        object                  = w_object
      TABLES
        lines                   = it_tline
      EXCEPTIONS
        id                      = 1
        language                = 2
        name                    = 3
        not_found               = 4
        object                  = 5
        reference_check         = 6
        wrong_access_to_archive = 7
        OTHERS                  = 8.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    The required output will be avialable in the IT_tline table.
    LOOP AT it_tline INTO st_tline.
      WRITE :/   st_tline-tdline.
    ENDLOOP.
    Message was edited by:
            Lakshmi Sekhar Reddy

  • Elements 7 on windows 7, have downloaded a new version on raw for my new camera eos50d still unable to read the raw files help

    Hi
    Hope someone can help me with this one, have a new computer with windows 7 as the operating system, have installed elements 7 and have now purchased the 50d, as i shoot in raw have tried to open the file but elements is unable to read the raw file, have looked on various threads and have downloaded the new version of raw, this version is saved in my download file directory, have copied across these files to the elements folder but i still cannot read my raw file for the 50d, is there something i have missed.
    collisa

    please have a look at the folllowing link about the isntallation of the camera raw plugin.
    http://kb2.adobe.com/cps/407/kb407344.html
    be sure not to have the older version of camera raw plugin in the same folder as that of new one. dont even rename it. Remove it and store it in some other location in case you need to revert back the changes. The camera raw plugin is called : Camera Raw
    thanks

  • Installation: my adobe elements version 12 is unable to read the raw files from my canon camera 70D.

    my adobe elements version 12 is unable to read the raw files from my canon camera 70D.

    You need Camera Raw 8.2 or higher.
    Elements 12 shipped with 8.1.
    Click Help > Updates to update Camera Raw

  • TcpListener not working on Azure: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host

    Hi Everybody,
    i'm playing a little bit with Windows Azure and I'm blocked with a really simple issue (or maybe not).
    I've created a Cloud Service containing one simple Worker Role. I've configured an EndPoint in the WorkerRole configuration, which allows Input connections via tcp on port 10100.
    Here the ServiceDefinition.csdef file content:
    <?xml version="1.0" encoding="utf-8"?>
    <ServiceDefinition name="EmacCloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2014-01.2.3">
    <WorkerRole name="TcpListenerWorkerRole" vmsize="Small">
    <Imports>
    <Import moduleName="Diagnostics" />
    <Import moduleName="RemoteAccess" />
    <Import moduleName="RemoteForwarder" />
    </Imports>
    <Endpoints>
    <InputEndpoint name="Endpoint1" protocol="tcp" port="10100" />
    </Endpoints>
    </WorkerRole>
    </ServiceDefinition>
    This WorkerRole is just creating a TcpListener object listening to the configured port (using the RoleEnvironment instance) and waits for an incoming connection. It receives a message and returns a hardcoded message (see code snippet below).
    namespace TcpListenerWorkerRole
    using System;
    using System.Net;
    using Microsoft.WindowsAzure.ServiceRuntime;
    using System.Net.Sockets;
    using System.Text;
    using Roche.Emac.Infrastructure;
    using System.IO;
    using System.Threading.Tasks;
    using Microsoft.WindowsAzure.Diagnostics;
    using System.Linq;
    public class WorkerRole : RoleEntryPoint
    public override void Run()
    // This is a sample worker implementation. Replace with your logic.
    LoggingProvider.Logger.Info("TcpListenerWorkerRole entry point called");
    TcpListener listener = null;
    try
    listener = new TcpListener(RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["Endpoint1"].IPEndpoint);
    listener.ExclusiveAddressUse = false;
    listener.Start();
    LoggingProvider.Logger.Info(string.Format("TcpListener started at '{0}:{1}'", RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["Endpoint1"].IPEndpoint.Address, RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["Endpoint1"].IPEndpoint.Port));
    catch (SocketException ex)
    LoggingProvider.Logger.Exception("Unexpected exception while creating the TcpListener", ex);
    return;
    while (true)
    Task.Run(async () =>
    TcpClient client = await listener.AcceptTcpClientAsync();
    LoggingProvider.Logger.Info(string.Format("Client connected. Address='{0}'", client.Client.RemoteEndPoint.ToString()));
    NetworkStream networkStream = client.GetStream();
    StreamReader reader = new StreamReader(networkStream);
    StreamWriter writer = new StreamWriter(networkStream);
    writer.AutoFlush = true;
    string input = string.Empty;
    while (true)
    try
    char[] receivedChars = new char[client.ReceiveBufferSize];
    LoggingProvider.Logger.Info("Buffer size: " + client.ReceiveBufferSize);
    int readedChars = reader.Read(receivedChars, 0, client.ReceiveBufferSize);
    char[] validChars = new char[readedChars];
    Array.ConstrainedCopy(receivedChars, 0, validChars, 0, readedChars);
    input = new string(validChars);
    LoggingProvider.Logger.Info("This is what the host sent to you: " + input+". Readed chars=" + readedChars);
    try
    string orderResultFormat = Encoding.ASCII.GetString(Encoding.ASCII.GetBytes("\xB")) + @"MSH|^~\&|Instrument|Laboratory|LIS|LIS Facility|20120427123212+0100||ORL^O34^ORL_O34| 11|P|2.5.1||||||UNICODE UTF-8|||LAB-28^IHE" + Environment.NewLine + "MSA|AA|10" + Environment.NewLine + @"PID|||patientId||""""||19700101|M" + Environment.NewLine + "SPM|1|sampleId&ROCHE||ORH^^HL70487|||||||P^^HL70369" + Environment.NewLine + "SAC|||sampleId" + Environment.NewLine + "ORC|OK|orderId|||SC||||20120427123212" + Encoding.ASCII.GetString(Encoding.ASCII.GetBytes("\x1c\x0d"));
    writer.Write(orderResultFormat);
    catch (Exception e)
    LoggingProvider.Logger.Exception("Unexpected exception while writting the response", e);
    client.Close();
    break;
    catch (Exception ex)
    LoggingProvider.Logger.Exception("Unexpected exception while Reading the request", ex);
    client.Close();
    break;
    }).Wait();
    public override bool OnStart()
    // Set the maximum number of concurrent connections
    ServicePointManager.DefaultConnectionLimit = 12;
    DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString");
    RoleEnvironment.Changing += RoleEnvironment_Changing;
    return base.OnStart();
    private void RoleEnvironment_Changing(object sender, RoleEnvironmentChangingEventArgs e)
    // If a configuration setting is changing
    LoggingProvider.Logger.Info("RoleEnvironment is changing....");
    if (e.Changes.Any(change => change is RoleEnvironmentConfigurationSettingChange))
    // Set e.Cancel to true to restart this role instance
    e.Cancel = true;
    As you can see, nothing special is being done. I've used the RoleEnvironment.CurrentRoleInstance.InstanceEndpoints to retrieve the current IPEndpoint.
    Running the Cloud Service in the Windows Azure Compute Emulator everything works fine, but when I deploy it in Azure, then I receive the following Exception:
    2014-08-06 14:55:23,816 [Role Start Thread] INFO EMAC Log - TcpListenerWorkerRole entry point called
    2014-08-06 14:55:24,145 [Role Start Thread] INFO EMAC Log - TcpListener started at '100.74.10.55:10100'
    2014-08-06 15:06:19,375 [9] INFO EMAC Log - Client connected. Address='196.3.50.254:51934'
    2014-08-06 15:06:19,375 [9] INFO EMAC Log - Buffer size: 65536
    2014-08-06 15:06:45,491 [9] FATAL EMAC Log - Unexpected exception while Reading the request
    System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    --- End of inner exception stack trace ---
    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    at System.IO.StreamReader.ReadBuffer(Char[] userBuffer, Int32 userOffset, Int32 desiredChars, Boolean& readToUserBuffer)
    at System.IO.StreamReader.Read(Char[] buffer, Int32 index, Int32 count)
    at TcpListenerWorkerRole.WorkerRole.<>c__DisplayClass0.<<Run>b__2>d__0.MoveNext() in C:\Work\Own projects\EMAC\AzureCloudEmac\TcpListenerWorkerRole\WorkerRole.cs:line 60
    I've already tried to configure an internal port in the ServiceDefinition.csdef file, but I get the same exception there.
    As you can see, the client can connect to the service (the log shows the message: Client connected with the address) but when it tries to read the bytes from the stream, it throws the exception.
    For me it seems like Azure is preventing the retrieval of the message. I've tried to disable the Firewall in the VM in Azure and the same continues happening.
    I'm using Windows Azure SDK 2.3
    Any help will be very very welcome!
    Thanks in advance!
    Javier
    En caso de que la respuesta te sirva, porfavor, márcala como válida
    Muchas gracias y suerte!
    Javier Jiménez Roda
    Blog: http://jimenezroda.wordpress.com

    hi Javier,
    I changed your code like this:
    private AutoResetEvent connectionWaitHandle = new AutoResetEvent(false);
    public override void Run()
    TcpListener listener = null;
    try
    listener = new TcpListener(
    RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["Endpoint"].IPEndpoint);
    listener.ExclusiveAddressUse = false;
    listener.Start();
    catch (SocketException se)
    return;
    while (true)
    IAsyncResult result = listener.BeginAcceptTcpClient(HandleAsyncConnection, listener);
    connectionWaitHandle.WaitOne();
    The HandleAsync method is your "While (true)" code:
    private void HandleAsyncConnection(IAsyncResult result)
    TcpListener listener = (TcpListener)result.AsyncState;
    TcpClient client = listener.EndAcceptTcpClient(result);
    connectionWaitHandle.Set();
    NetworkStream netStream = client.GetStream();
    StreamReader reader = new StreamReader(netStream);
    StreamWriter writer = new StreamWriter(netStream);
    writer.AutoFlush = true;
    string input = string.Empty;
    try
    char[] receivedChars = new char[client.ReceiveBufferSize];
    // LoggingProvider.Logger.Info("Buffer size: " + client.ReceiveBufferSize);
    int readedChars = reader.Read(receivedChars, 0, client.ReceiveBufferSize);
    char[] validChars = new char[readedChars];
    Array.ConstrainedCopy(receivedChars, 0, validChars, 0, readedChars);
    input = new string(validChars);
    // LoggingProvider.Logger.Info("This is what the host sent to you: " + input + ". Readed chars=" + readedChars);
    try
    string orderResultFormat = Encoding.ASCII.GetString(Encoding.ASCII.GetBytes("\xB")) + @"MSH|^~\&|Instrument|Laboratory|LIS|LIS Facility|20120427123212+0100||ORL^O34^ORL_O34| 11|P|2.5.1||||||UNICODE UTF-8|||LAB-28^IHE" + Environment.NewLine + "MSA|AA|10" + Environment.NewLine + @"PID|||patientId||""""||19700101|M" + Environment.NewLine + "SPM|1|sampleId&ROCHE||ORH^^HL70487|||||||P^^HL70369" + Environment.NewLine + "SAC|||sampleId" + Environment.NewLine + "ORC|OK|orderId|||SC||||20120427123212" + Encoding.ASCII.GetString(Encoding.ASCII.GetBytes("\x1c\x0d"));
    writer.Write(orderResultFormat);
    catch (Exception e)
    // LoggingProvider.Logger.Exception("Unexpected exception while writting the response", e);
    client.Close();
    catch (Exception ex)
    //LoggingProvider.Logger.Exception("Unexpected exception while Reading the request", ex);
    client.Close();
    Please try it. For this error message, I suggest you could refer to this thread (http://stackoverflow.com/questions/6173763/using-windows-azure-to-use-as-a-tcp-server
    ) and this post (http://stackoverflow.com/a/5420788).
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Unable to read the freq and amplitude

    if you could look at the prog.s attached and if you can explain why i am unable to read the data output from "scalled data vs seconds" into tone measurments.
    it must have something to do with the conversion from the cluster of 3 elements to the DBL waveform can anyone see the mistake in the conversion!!

    Please re-post your VI "problem" with default values saved on both graphs.
    Thanks

  • B2B RosettaNet Rcpt Ack and Excp throws error "Unable to read the preamble"

    Hello All,
    We have configured a 2 way PIP Config and we are able to succesfully transfer the paload to the TP.
    But when receiving the Ackowledgement and Exception, we are getting error "B2B-51705 Unable to read the preamble"
    Can anyone help me on this
    Thanks,
    Sunil

    Hi Anuj,
    Just want to confirm one more thing
    Below given the xsd used for Exception and Acknowledgement
    Can you please confirm the format of the same
    AcknowledgeMent
    ===========
    <?xml version = "1.0" encoding = "UTF-8"?>
    <!-- -->
    <!-- Copyright (c) 2000 BEA -->
    <!-- All rights reserved -->
    <!-- -->
    <!-- THIS IS UNPUBLISHED PROPRIETARY -->
    <!-- SOURCE CODE OF BEA Systems Inc. -->
    <!-- The copyright notice above does not -->
    <!-- evidence any actual or intended -->
    <!-- publication of such source code. -->
    <xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema">
    <xsd:annotation>
         <xsd:documentation>
    RosettaNet XML Message Schema
    AcknowledgmentOfReceipt_MS_V02_00.dtd
    This document has been prepared by Edifecs (http://www.edifecs.com/)
    based On the Business Collaboration Framework from requirements
    in conformance with the RosettaNet methodology.
         </xsd:documentation>
    </xsd:annotation>
         <xsd:element name = "ReceiptAcknowledgment">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref = "NonRepudiationInformation" minOccurs = "0"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name = "NonRepudiationInformation">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref = "OriginalMessageDigest"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name = "OriginalMessageDigest" type = "xsd:string"/>
    </xsd:schema>
    Exception
    =====
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!--W3C Schema generated by XMLSpy v2011 rel. 3 sp1 (http://www.altova.com)-->
    <!--Please add namespace attributes, a targetNamespace attribute and import elements according to your requirements-->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
         <xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
         <xs:element name="Exception">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="ExceptionDescription"/>
                        <xs:element ref="GlobalExceptionTypeCode"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="ExceptionDescription">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="errorClassification"/>
                        <xs:element ref="errorDescription"/>
                        <xs:element ref="offendingMessageComponent" minOccurs="0"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="errorClassification">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="GlobalMessageExceptionCode"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="GlobalMessageExceptionCode">
              <xs:complexType mixed="true"/>
         </xs:element>
         <xs:element name="errorDescription">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="FreeFormText"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="FreeFormText">
              <xs:complexType mixed="true">
                   <xs:attribute ref="xml:lang"/>
              </xs:complexType>
         </xs:element>
         <xs:element name="offendingMessageComponent">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="GlobalMessageComponentCode"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="GlobalMessageComponentCode">
              <xs:complexType mixed="true"/>
         </xs:element>
         <xs:element name="GlobalExceptionTypeCode">
              <xs:complexType mixed="true"/>
         </xs:element>
    </xs:schema>
    Pleace correct me if I am wrong in these xsd's
    Thanks,
    Sunil

Maybe you are looking for