How to Integrate a Game at IDC Games
  • Introduction
  • Quick Integration Guide
    • 1. Upload your game
    • 2. You integrate our login system
    • 3. Quick Payments Integration
    • 4. Upload Content to the Game Page
    • 5. Player acquisition
  • Complete Integration Guide
    • Introducion
    • 1. Panel Guide
      • 1.1. Create a new game
      • 1.2 Game Configuration
      • 1.3 Shop
        • 1.3.1. Shop Wizard
        • 1.3.2. Shop Offers
        • 1.3.3. Shop Coupons
        • 1.3.4. Shop Themes
        • 1.3.5. Test shop
      • 1.4. Multi-Language
      • 1.5. Releases
      • 1.6. DLC
      • 1.7. Store Content
      • 1.8. Content
      • 1.9. WebSection
      • 1.10. Purchase Report
        • 1.10.1. Dashboard
        • 1.10.2 Client & App
        • 1.10.3 Gamer Level
        • 1.10.4 Region & Country
        • 1.10.5 Purchase Notifications
        • 1.10.6 Sales Wallet
        • 1.10.7 Player Summary
      • 1.11 Stats Report
        • 1.11.1 Leads
        • 1.11.2 Retention
        • 1.11.3 Login
        • 1.11.4 Payment
        • 1.11.5 Wishlist
    • 2. Login Guide
      • 2.1. Login with Unity
      • 2.2. Login with C#
      • 2.3. Login with C++/Unreal
      • 2.4. Login with HTTP
      • 2.5. Login with Web Service Definition Language (WSDL)
    • 3. Payments Guide
      • 3.1. Payments Integration Overview
      • 3.2. How to launch the Shop
    • 4. API Guide
      • Releases Workflow
      • C# examples
  • The Platform Visual Guide
    • About the Game Platform
    • General Pages
    • Game page
  • Glossary
    • Glossary
Powered by GitBook
On this page
  • Example of login with C#
  • Request extra info about users in C#

Was this helpful?

  1. Complete Integration Guide
  2. 2. Login Guide

2.2. Login with C#

Previous2.1. Login with UnityNext2.3. Login with C++/Unreal

Last updated 1 year ago

Was this helpful?

You can download the C# package

Example of login with C#

    [DllImportAttribute("idclib.dll")]
        public static extern int GetAccessData(int idcgameid, string idctk, string idcuuid, ref int iduser, 
          [Out] StringBuilder usercrc,
          [Out] StringBuilder language, 
          [Out] StringBuilder country,
          [Out] StringBuilder currency);

    [DllImportAttribute("idclib.dll")]
        public static extern int GetUserProfileInfo(int userid, string secret,
          [Out] StringBuilder nick, [Out] StringBuilder email,
          [Out] StringBuilder status, [Out] StringBuilder avatar,
          [Out] StringBuilder custom, [Out] StringBuilder language,
          [Out] StringBuilder country, [Out] StringBuilder currency);

        private void idcfunctions()
        {
            int result = 0;

    //getAcessData params
            int userid = 0;
            int gameid = 1;
            StringBuilder usercrcaux = new StringBuilder(256);
            StringBuilder countryaux = new StringBuilder(3);
            StringBuilder languageaux = new StringBuilder(3);
            StringBuilder currencyaux = new StringBuilder(3);
            string usercrc;
            string country;
            string language;
            string currency;

    //getUserProfileInfo params
        //int gameid; //already defined in getAccessData params
            string token = "4a0a7b6e8f7775f84883093e1028a0a2";
            string uuid = "6022DAAE-03F7-11E9-BB88-E86A6485A3C7";
            StringBuilder nickaux = new StringBuilder(80);
            StringBuilder emailaux = new StringBuilder(320);
            StringBuilder statusaux = new StringBuilder(1024);
            StringBuilder avataraux = new StringBuilder(1024);
            StringBuilder customaux = new StringBuilder(1024);
            string nick;
            string email;
            string status;
            string avatar;
            string custom;

            result = getAccessData(gameid, token, uuid, ref userid, usercrcaux, countryaux, languageaux, currencyaux);
            if (result == 0)
            {
                usercrc = usercrcaux.ToString();
                country = countryaux.ToString();
                language = languageaux.ToString();
                currency = currencyaux.ToString();
            }

            result = getUserProfileInfo(userid, secret, nickaux, emailaux, statusaux, avataraux, customaux, countryaux, languageaux, currencyaux);
            if (result == 0)
            {
                nick = nickaux.ToString();
                email = emailaux.ToString();
                status = statusaux.ToString();
                avatar = avataraux.ToString();
                custom = customaux.ToString();
                country = countryaux.ToString();
                language = languageaux.ToString();
                currency = currencyaux.ToString();
          }
        }

Request extra info about users in C#

Method definitions:

[DllImportAttribute("idclib_64.dll")]
public static extern int getUserProfileInfo (string userid, string apisecret, [Out] StringBuilder nick, [Out] StringBuilder email, [Out] StringBuilder avatar, [Out] StringBuilder status, [Out] StringBuilder custom;

At the class that calls the method:

IntBuilder nick = new IntBuilder(80);
StringBuilder email = new StringBuilder(320);
StringBuilder avatar = new StringBuilder(2048);
StringBuilder status = new StringBuilder(256);
StringBuilder custom = new StringBuilder(256);
Int result = getUserProfileInfo (userid, apisecret, nick, email, avatar, status, custom);
here
.