Results 1 to 7 of 7

Thread: Porting from Windows to Cloud

  1. #1

    Default Porting from Windows to Cloud

    Hey guys. I spent the last 6 months writing some software for Windows, and it might be such a big hit that I need to put it in the cloud. What kinds of changes will I need to make to my Windows software to port it to a cloud server?

    For example, right now, I don't have to keep track of a USER ID -- but if we move the software to the cloud, I will need to somehow capture a USER ID. How does the user log in?

    Is there a Windows command to get the USER ID? Is that the same command I will use in the Cloud environment?

    thanks!
    Guy

  2. #2
    Join Date
    Feb 2009
    Location
    Peoria, IL
    Posts
    5,285

    Default Re: Porting from Windows to Cloud

    For Windows applications the "cloud" is just a remote computer (server or workstation). It's still Windows.
    Chuck Atkinson

    All generalizations are false, including this one - Mark Twain

  3. #3
    Join Date
    Feb 2009
    Location
    Brazil
    Posts
    2,418

    Default Re: Porting from Windows to Cloud

    As chuck said...

    I guess you will have a server (hosted in the cloud) , with your app installed on it.

    Users will have to login to the server through RDP/TerminalServices (old name)

    But answering your question. Yes, there is.

    Get_environment command, retrieve any environment variable values. so

    Code:
    String sUser
    Get_Environment "USERNAME" to sUser
    showln sUser
    Should work for you
    Samuel Pizarro

  4. #4

    Default Re: Porting from Windows to Cloud

    Yes! Thank you Samuel! That worked great. However, I'm a little concerned about multiple users having the same name. Is there a command that would return a unique identifier (MAC address?) for the machine they are working on?
    Last edited by the Guy; 18-Jan-2020 at 06:00 PM.

  5. #5
    Join Date
    Feb 2009
    Location
    Brazil
    Posts
    2,418

    Default Re: Porting from Windows to Cloud

    Guy. You should not have this issue

    on the “cloud” there will be no workstation, unless your customer is also planning to have virtual desktops workstations running in the same cloud environment, with your server where your app is running. But this scenario is not likely the common use case.

    As I said earlier, the users will have to connect remotely to the server in the “cloud provider” using RDP. This will open a remote session on the server for each user. Your server must be licensed ( remote CALs) to allow N rdp sessions.
    And you can configure the server to allow only one single session per user. The user will normally belongs to a windows domain, so no chance of having duplicated user names.

    If you give more details on how your “cloud” environment will be, Others that have worked on this will be able to assist.
    I have never done this using recent cloud providers, but have done a lot of df deployment on windows terminal services.

    Regards and good luck
    Samuel Pizarro

  6. #6
    Join Date
    Feb 2009
    Location
    Peoria, IL
    Posts
    5,285

    Default Re: Porting from Windows to Cloud

    Ok I'll bite. You can give this a try.

    Code:
    External_Function WNetGetUser "WNetGetUserA" MPR.DLL Pointer lpName Pointer lpUser_Name Pointer lpLength Returns DWord
    
    
    //****************************************************************************
    // $Module type: FUNCTION
    // $Module name: Network_User_Name
    // $Author     : AK/VOO/KCR
    // Created     : 09-24-96 @ 19:17
    //
    // Description
    //    This function reads the current username Of windows and returns that
    //    name or an text unknown user
    //
    // $Rev History
    //  02/22/2012  Ask Windows how long the size of the name should be
    //  07/25/2003  Replaced obsolete code
    //  09/24/1996  Module header created
    //****************************************************************************
    Function Network_User_Name for cDesktop Returns String
        String sName
        Integer iRetval iLength
    
    
        Move 0 to iLength
        Move (WNetGetUser (0, 0, AddressOf (iLength))) to iRetval
        ZeroString iLength to sName
        Move (WNetGetUser (0, AddressOf (sName), AddressOf (iLength))) to iRetval
    
    
        If (iRetval = NO_ERROR) Begin
            Function_Return (CString (sName))
        End
        
        Function_Return "User Unknown"
    End_Function
    Chuck Atkinson

    All generalizations are false, including this one - Mark Twain

  7. #7
    Join Date
    Mar 2009
    Location
    Adelaide, South Australia
    Posts
    422

    Default Re: Porting from Windows to Cloud

    Guy,
    Are you sure a Windows app is the best solution? It seems you are expecting a great many users. RDP connections are incredibly insecure and are really only usable vi a VPN which requires software on the client. I believe a Web app would be far better both for security and scaleability not to mention the per user licensing cost.
    Ian
    The most important leg on a three legged stool is the one that's missing.
    Murphy's Law (2)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •