3 Replies Latest reply on May 6, 2015 8:42 AM by Daniel Silva

    fusion dll

    Elie Bejou

      Hi Everyone,

       

       

      I have developped a .net C# software that enable/disable fusion state (WLAN card).

       

      I have to install the huge symbol.all.arm.cab (almost 4Mb) librairies into my MC2180 terminal!

      My question is, can anyone tell me if i can basically use some DLL's accompanying my EXE;

       

      I'm just using fusion librairies as below:

      using Symbol.Fusion;

      using Symbol.Fusion.WLAN;

      using Symbol.Exceptions;

       

      Thanks in advance

       

      Elie

        • Re: fusion dll
          Christopher Sather

          You may be able to do this with a reg key setting instead of an app an a big library.

           

          check this registry key for its value, and change it to 0, that will enable your radio.

           

           

          ;InitialState is a dword represent CEDEVICE_POWER_STATE, valid values

              ;are: 0 - D0, 1 - D1, 2 - D2, 3 - D3, 4 - D4.

              "InitialState"=dword:0        ; D4, changed default to OFF, product team to override if needed

            • Re: fusion dll
              Elie Bejou

              Hi Chris and thanks for your message.

               

              I tried this but it's not dynamic; I need to dynamically turn off and ON the WiFi card.

              Tested registry but a reboot is required.

               

              Thanks for your comments.

               

              Elie

                • Re: Re: fusion dll
                  Daniel Silva

                  You can just deploy the dlls you need, you don't need to deploy the whole symbol cab file.  If you have debugged the app, the dlls you need are probably in the same folder on the device as the executable is.

                   

                  If you really just need to turn the radio on and off, you don't need our dlls for that.  You can use some code like below.

                   

                  [DllImport("coredll.dll", EntryPoint="DevicePowerNotify")]

                  private static extern uint CEDevicePowerNotify(string Device, uint DeviceState, uint Flags);

                   

                   

                  public int DevicePowerNotify( string deviceName, DevicePowerStates deviceState )

                  {

                    uint nError = 0;

                    nError = CEDevicePowerNotify( deviceName, (uint)deviceState, (uint)PowerReqFlags.POWER_NAME );

                    return (int)nError;

                  }

                   

                   

                  public enum DevicePowerStates

                  {

                    PwrDeviceUnspecified = -1,

                    FullOn = 0,// Full On: full power,  full functionality

                    D0 = FullOn,

                    LowOn,// Low Power On: fully functional at low power/performance

                    D1 = LowOn,    

                    StandBy,// Standby: partially powered with automatic wake

                    D2 = StandBy,    

                    Sleep,// Sleep: partially powered with device initiated wake

                    D3 = Sleep,    

                    Off,// Off: unpowered

                    D4 = Off,    

                    PwrDeviceMaximum

                  }

                   

                   

                  public enum PowerReqFlags : uint

                  {

                    POWER_NAME = 0x00000001,

                    POWER_FORCE = 0x00001000,

                  }

                   

                   

                  private void btnON_Click(object sender, System.EventArgs e)

                  {

                    DevicePowerNotify("wcs1:",DevicePowerStates.FullOn);

                   

                  }

                   

                   

                  private void btnOFF_Click(object sender, System.EventArgs e)

                  {

                    DevicePowerNotify("wcs1:",DevicePowerStates.Off);

                  }