> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bright-sdk.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bright SDK for Windows (C/C++) - Integration Guide

> This guide is for developers who want to monetize C/C++ Windows applications with Bright SDK.

export const SubmitIntegrationReview = ({platform}) => <>
    <p><strong>Pre-Submission Requirements</strong></p>
    <p>The Bright Data SDK compliance team will verify:</p>
    <ul>
      <li>SDK integration UX and functionality.</li>
      <li>Consent screen implementation.</li>
      <li>Opt-out mechanism.</li>
      <li>User value proposition.</li>
    </ul>

    <ol>
      <li>
        <strong>Submission Process</strong>
        <Note>
          Self-check using an emulator/simulator is not yet supported. Currently, self-check can only be performed on a real device.
        </Note>
        <ol type="a">
          <li>
            <strong>Run Self-Check (takes a few minutes)</strong> — Complete the self-check verification to identify potential issues before submission:
            <ul>
              <li>Navigate to the <a href="https://bright-sdk.com/cp/apps">Bright SDK Dashboard</a> and click your appID.</li>
              <li>Scroll down to "Implementation self-check", click "Get started".</li>
              <li>Install the app on the test device and follow the instructions.</li>
              <li>If the self-check passed successfully, submit it for review!</li>
            </ul>
            <Note>
              <strong>If the SDK isn't initializing / peer not connecting:</strong>
              <ol>
                <li>Verify the correct App ID is used, confirm the SDK service is running.</li>
                <li>Check there aren't multiple SDK apps running from the same IP — that can interfere.</li>
                <li>If nothing helps, check with our team.</li>
              </ol>
            </Note>
          </li>
          <li>
            <strong>Submit for review via Dashboard</strong>
            <ul>
              <li>Navigate to the <a href="https://bright-sdk.com/cp/apps">Bright SDK Dashboard</a>.</li>
              <li>Select your app ID.</li>
              <li>Click "Submit for Review".</li>
              <li>Complete the compliance checklist to validate adherence to guidelines.</li>
              <li>Upload your package.</li>
            </ul>
          </li>
        </ol>
      </li>
      <li>
        <strong>Store submission</strong> — You will be notified by email once your app is approved for release. The app status in the dashboard will also be changed to "Approved".
        {platform !== "ios" && platform !== "macos" && platform !== "android" && <>
            <p>Guides to help you through the store review:</p>
            <ul>
              <li><a href="https://docs.bright-sdk.com/integration-guides/how-to-upload-apps-to-the-lg-store">LG</a></li>
              <li><a href="https://docs.bright-sdk.com/integration-guides/how-to-upload-apps-to-the-samsung-store">Samsung</a></li>
            </ul>
          </>}
      </li>
      <li>
        <strong>Review Resources</strong>
        <ul>
          <li>Watch our <a href="https://www.youtube.com/watch?v=kQCmca0FHyw">guided tour video</a> for critical submission tips.</li>
          <li>Review our <a href="https://bright-sdk.com/blog/monetization-optimization/ensuring-excellence-bright-sdks-guidelines-for-excellent-apps">quality standards</a> for faster approval.</li>
        </ul>
      </li>
    </ol>

    {platform === "ios" && <>
        <p><strong>For iOS/tvOS — How to submit your build:</strong></p>

        <ul>
          <li>Paste a public link in the "Submit for Review" window on the dashboard, OR</li>
          <li>Send via TestFlight to all 4 addresses below (one invite per address):</li>
        </ul>

        <table>
          <thead>
            <tr>
              <th>Email</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>sdk@brightdata.com</td>
            </tr>
            <tr>
              <td>sdk+1@brightdata.com</td>
            </tr>
            <tr>
              <td>sdk+2@brightdata.com</td>
            </tr>
            <tr>
              <td>sdkcompliance@brightdata.com</td>
            </tr>
          </tbody>
        </table>
      </>}

    <Info>
      We will review each app up to 3 times. 3 rejections or failure to meet minimum quality standards may result in final rejection.
    </Info>
  </>;

export const CustomConsentWin = ({platform}) => <>
    <Warning>
      <strong>Subject to Bright SDK approval</strong>, you can create and use your own consent screen with Bright SDK. Please follow the following guidelines.
    </Warning>

    <p>This is what it looks like on the default Bright SDK screen:</p>

    <img src="/snippets/image/default_consent_screen.png" alt="Alt text" width="400" />

    <p><strong>Design Requirements:</strong></p>

    <p>Your custom consent screen must comply with the following requirements:</p>

    <ol>
      <li><strong>Mandatory Text -</strong> Your screen must include the following text exactly as written:</li>
    </ol>

      <pre><code className="language-markdown">{`" To [Benefit to user], please allow Web Indexing by Bright Data to use your device's free resources and IP address to download public web data from the Internet.

      Bright Data values your trust and takes every measure possible to protect your privacy and personal data.

      Bright Data understands the security matters at stake in sharing your IP address and monitors all of its network traffic to ensure your safety.

      Bright Data will only use your IP address for approved business-related use cases and never for unauthorized cases.

      None of your personal information is accessed or collected except your IP address."`}</code></pre>

    <ol start="2">
      <li><strong>Additional Required Text</strong></li>
    </ol>

      <pre><code className="language-markdown">{`"Learn more about web indexing by Bright Data
      Learn more about Bright Data’s Privacy Policy
      Bright Data runs in the background even after closing the application.
      Updates will be automatically downloaded by your device from time to time and will be subject to the EULA (End User Level Agreement)"`}</code></pre>

    <Note>
      <strong>Important:</strong> "<a href="https://bright-sdk.com/users#learn-more-about-bright-sdk-web-indexing">Learn more</a>", "<a href="https://bright-sdk.com/privacy-policy">Privacy Policy</a>" and "<a href="https://bright-sdk.com/eula">EULA (End User Level Agreement)</a>" should redirect to the relevant links.
    </Note>

    <ol start="3">
      <li><strong>Interactive Popups -</strong> Clicking on "<em>will only use</em>" → Opens popup:</li>
    </ol>

      <pre><code className="language-markdown">{`"Your IP address WILL be used for cases such as: 
      Support academic research 
      Help brands track sites selling fake products 
      Collect public web data like product prices and reviews 
      Aggregate travel information like flights and hotel prices "`}</code></pre>

    <p>Example:</p>

    <img src="/snippets/image/custom-consent-windows-1.png" alt="Alt text" width="400" />

    <p>Clicking on "never" → Opens popup:</p>

    <pre><code className="language-markdown">{`"Your IP address will NEVER be misused: 

Never to steal, encrypt, or delete sensitive data 
Never to alter or hijack core computing functions 
Never to monitor users' computer activity 
Never to access illegal sites (dark web, porn, etc.) 
Never to perform DDOS attacks "`}</code></pre>

    <p>Example:</p>

    <img src="/snippets/image/custom-consent-windows-2.png" alt="Alt text" width="400" />

    <p><strong>Integration Code:</strong></p>

    {platform === "win" && <>
        <ol>
          <li><strong>Skip Default Consent Screen - </strong>Pass <code>SkipConsent = true</code> in the SDK's initialization method to prevent showing the default consent screen.</li>
          <li><strong>Track Consent Screen Display - </strong>When your external consent screen is displayed, call <code>NotifyShowConsent()</code> method.</li>
          <li><strong>Handle User Response</strong>
            <ul>
              <li>The opt-in button (e.g. "<em>I Agree</em>”) should call <code>ExternalOptIn()</code> method.</li>
              <li>The opt-out button (e.g. "<em>I Disagree</em>”) should call <code>OptOut()</code> method.</li>
            </ul>
          </li>
        </ol>

        <p>Example Custom Screens:</p>

        <img src="/snippets/image/custom-consent-windows-3.png" alt="Alt text" width="400" />
        <br />
        <img src="/snippets/image/custom-consent-windows-4.png" alt="Alt text" width="400" />
      </>}

    {platform === "macos" && <>
        <ul>
          <li>Pass <code>skip_consent: true</code> (or equivalent) in the SDK initializer to prevent the default consent screen from showing.</li>
          <li>The opt-in button (e.g., "I Agree") should call <code>external_opt_in()</code>.</li>
          <li>The opt-out button (e.g., "I Disagree") should call <code>opt_out()</code>.</li>
          <li>After presenting your custom screen, call <code>consent_shown()</code>.</li>
        </ul>
      </>}
  </>;

### Requirements

* Windows operating system.
* C/C++ compiler (Visual Studio recommended).
* Assigned App ID from Bright SDK Dashboard.

<Steps>
  <Step title="Create App ID on Dashboard" titleSize="h3">
    If you haven't done this yet, log in to your [Bright SDK Dashboard](https://bright-sdk.com/cp/apps) and create your app ID first.

    <u>Format:</u> Your assigned App ID uniquely identifies your application and associates the peers provided by your application with you in the Bright Data network.
  </Step>

  <Step title="Install SDK Files" titleSize="h3">
    You can set up the Bright SDK in your .NET Windows app in two ways:

    * [**Using the Bright SDK integration CLI tool**](https://brightsdk.github.io/bright-sdk-integration/) <Badge color="green">Recommended</Badge> - automatically downloads the SDK, copies the required files, and patches your `.csproj` with the necessary references.
    * **Manually** - download the SDK from the sdk downloader and copy the files yourself.

    Either way, you will still need to add the SDK initialization code to your app.

    <AccordionGroup>
      <Accordion title="Option A - Using the Integration Tool (Recommended)">
        Run the tool using the [bright-sdk-integration](https://brightsdk.github.io/bright-sdk-integration/) CLI. See the [Windows example](https://github.com/BrightSDK/bright-sdk-integration-example-windows) for full setup instructions.

        The tool will:

        1. Download the latest BrightSDK zip from `cdn.bright-sdk.com/static/`.
        2. Extract `lum_sdk.dll` and `net_updater64.exe` into `BrightSDK/`.
        3. Copy `brd_config.json` into your app directory.
        4. Inject a `<Reference>` to `lum_sdk.dll` and a `<None>` entry for `brd_config.json` into your `.csproj`.
        5. Save `brd_sdk.config.json` for future runs.

        Once the tool completes, skip to [Step 3 - Integrate Bright SDK in Your Code](#integrate-bright-sdk-in-your-code).
      </Accordion>

      <Accordion title="Option B - Manual">
        Download the latest Bright SDK **using** the [Bright SDK downloader](https://brightsdk.github.io/bright-sdk-downloader-rs/), unzip it.

        Once you unzip the SDK, the following files are of interest:

        | **File (32-bit)**   | **File (64-bit)**   | **Description**                                                                  |           |
        | :------------------ | :------------------ | :------------------------------------------------------------------------------- | --------- |
        | `net_updater32.exe` | `net_updater64.exe` | Bright Data Windows service installer, uninstaller and entry point               |           |
        | `lum_sdk32.dll`     | `lum_sdk64.dll`     | C++ native API                                                                   |           |
        | `lum_sdk32.lib`     | `lum_sdk64.lib`     | Link lib for \`lum\_sdk(32                                                       | 64).dll\` |
        | `lum_sdk.h`         | `lum_sdk.h`         | Header file to include in C/C++ binaries (imports with `*_c` suffix are c-style) |           |
        | `brd_config.json`   | `brd_config.json`   | Consent configuration and customization                                          |           |

        <Warning>
          **Important:** `lum_sdk.dll`, `net_updater32.exe` and `brd_config.json` files must be located next to each other when running the application.
        </Warning>
      </Accordion>
    </AccordionGroup>
  </Step>

  <Step title="Integrate Bright SDK in Your Code" titleSize="h3">
    **Add SDK Files to Your Solution**

    **Microsoft Visual C/C++ App**

    Use `vc++_console_64bit` from samples directory for reference. Add the following files to your project:

    * `lum_sdk.h`
    * `lum_sdk(32|64).lib`
    * `lum_sdk(32|64).dll`
    * `brd_config.json`

    Make sure `lum_sdk(32|64).dll` and `brd_config.json` are copied to the output folder.

    <Note>
      If you used the CLI tool in Option A, skip copying `lum_sdk.dll` and `brd_config.json` - they are already in place in `BrightSDK/` and `app/`. You still need to add `lum_sdk.h`, `lum_sdk(32|64).lib` to your project and ensure all files are copied to the output folder.
    </Note>

    **Non-Microsoft or Non-C Apps**

    * Use the equivalent to `LoadLibrary` & `GetProcAddress` in your language/compiler.
    * Load all `xxx_c` method variants you require from `lum_sdk32.dll`.
    * Don't forget to include the `dll` in your app package.
    * Once imported, use same API flow as in previous implementation sample.

    <Note>
      All included samples in the SDK package should compile and run as-is (Note: some of the more exotic samples are not verified for each release).
    </Note>

    **Add SDK Initialization to Your Code**

    1. Configure and initialize Bright SDK during your application's startup initialization.
    2. Set required fields (use `brd_config.json` and/or set them programmatically - see [API Documentation](#api-documentation)).
    3. Call `brd_sdk_init()`.
    4. Write handler code for the user choice change event.
       * For example: enable/disable ads or premium features. Close the SDK when your application is exiting.

    <Note>
      `brd_sdk_init()` will show a consent screen to the user only if the user hasn't seen the consent screen before (didn't agree or disagree). You can disable consent on `init` completely with `brd_sdk_set_skip_consent_on_init(TRUE)` and manually show it later with `brd_sdk_show_consent()`.
    </Note>

    See [Code Example](#code-example) at the end of the guide.
  </Step>

  <Step title="Add Opt-In/Out Settings Option" titleSize="h3">
    <Danger>
      **<u>Critical Requirement:</u>** The user must always be able to opt-out of Bright SDK after giving their initial consent.
    </Danger>

    Regardless of the user's initial choice, you must add an option for users to opt-in/out at any time. This is usually placed in the settings menu.

    <Note>
      Every time the user toggles Web Indexing **ON**, the consent screen must reappear — regardless of any previous opt-in.
    </Note>

    **<u>Adding Opt-In/Out to Your Existing Settings Menu:</u>**

    <u>Requirements:</u>

    1. Add a switch (checkbox/toggle button) labeled "Web Indexing":
       * Must clearly reflect current status (opted-in or opted-out).
       * Should be checked if `BrightData.Api.ConsentChoice` is true.
       * Unchecking it should call `BrightData.Api.OptOut()`.
       * Checking it should call `BrightData.Api.ShowConsent()`.
    2. Add value text below the switch:
       * Emphasize the benefits users get when opting in. [(see examples)](https://docs.bright-sdk.com/integration-guides/windows-integration-net#:~:text=Examples%20of%20opted%2Din%20and%20opted%2Dout%20scenarios%3A)
    3. Include a "Learn More" option:
       * Hyperlink should open a browser window: [https://bright-sdk.com/users#learn-more-about-bright-sdk-web-indexing](https://bright-sdk.com/users#learn-more-about-bright-sdk-web-indexing)
    4. UX Guidelines:
       * You're free to choose the UX (radio button, switch, etc.).
       * The opt-out option must be clearly labeled.
       * Users must be able to freely opt-out.

    See Code Examples at the end of the guide:

    * [.NET](https://docs.bright-sdk.com/integration-guides/windows-integration-net#code-example)
    * [C/C++](https://docs.bright-sdk.com/integration-guides/windows-integration-c#code-example)

    <Info>
      Ensure the opt-out functionality is fully implemented before submitting for review. Bright Data will verify both UX and functionality during the approval process.
    </Info>

    **<u>Examples of opted-in and opted-out scenarios:</u>**

    <Columns cols={2}>
      <Card img="https://mintcdn.com/brightdata-31a14106/e3Qp1IZoAaZHR0fS/snippets/image/opt-in-out-windows-1.png?fit=max&auto=format&n=e3Qp1IZoAaZHR0fS&q=85&s=a45794a62f2b7337c07b9355b0189a89" width="582" height="440" data-path="snippets/image/opt-in-out-windows-1.png" />

      <Card img="https://mintcdn.com/brightdata-31a14106/e3Qp1IZoAaZHR0fS/snippets/image/opt-in-out-windows-2.png?fit=max&auto=format&n=e3Qp1IZoAaZHR0fS&q=85&s=b2e03a1e0a2e0aa68006928ea68cbc01" width="582" height="440" data-path="snippets/image/opt-in-out-windows-2.png" />

      <Card img="https://mintcdn.com/brightdata-31a14106/e3Qp1IZoAaZHR0fS/snippets/image/opt-in-out-windows-3.png?fit=max&auto=format&n=e3Qp1IZoAaZHR0fS&q=85&s=c1ea298180b2bccbd2cc6121392a923a" width="1999" height="947" data-path="snippets/image/opt-in-out-windows-3.png" />

      <Card img="https://mintcdn.com/brightdata-31a14106/e3Qp1IZoAaZHR0fS/snippets/image/opt-in-out-windows-4.png?fit=max&auto=format&n=e3Qp1IZoAaZHR0fS&q=85&s=263d74b87b46cb49f818ebc5f983cab8" width="1999" height="947" data-path="snippets/image/opt-in-out-windows-4.png" />
    </Columns>

    **<u>Value Text Examples:</u>**

    | **When opted-out:**              | **When opted-in:**                      |
    | :------------------------------- | :-------------------------------------- |
    | Enable to see fewer ads          | When enabled you see fewer ads          |
    | Enable to get 100 extra coins    | When enabled you get 100 extra coins    |
    | Enable to enjoy premium features | When enabled you enjoy premium features |
    | Enable to get 2 free cars        | When enabled you get 2 free cars        |
    | Enable to unlock more levels     | When enabled you unlock more levels     |

    **<u>Common Mistakes to Avoid:</u>**

    | **Example**                     | **Issue**                                                  |
    | :------------------------------ | :--------------------------------------------------------- |
    | Label: "Bright SDK"             | ❌ Label should be "Web Indexing", not "Bright/Bright SDK"  |
    | Switch without value text       | ❌ Missing text emphasizing value to users                  |
    | Switch without status indicator | ❌ Switch should clearly show current opt-in/opt-out status |
    | No "Learn More" option          | ❌ Missing link/QR code to information page                 |

    <u>Optional: Confirmation Dialogs</u>

    **<u>You may add pop-up/confirmation dialogs to:</u>**

    * <u>Discourage opt-out:</u> "If you disable Web Indexing, you will start seeing ads. Do you want to see ads?"
    * <u>Confirm opt-out:</u> "You have successfully disabled Web Indexing. You may enable it again anytime from the settings menu."

    <Info>
      You are responsible for the text and design. These will be reviewed before publishing.
    </Info>

    **<u>Opt-Out Messages examples:</u>**

    <Columns cols={2}>
      <Card img="https://mintcdn.com/brightdata-31a14106/e3Qp1IZoAaZHR0fS/snippets/image/opt-in-out-windows-5.png?fit=max&auto=format&n=e3Qp1IZoAaZHR0fS&q=85&s=76493de1851b1a6de365a668324dac2c" width="1600" height="1000" data-path="snippets/image/opt-in-out-windows-5.png" />

      <Card img="https://mintcdn.com/brightdata-31a14106/e3Qp1IZoAaZHR0fS/snippets/image/opt-in-out-windows-6.png?fit=max&auto=format&n=e3Qp1IZoAaZHR0fS&q=85&s=1c31f422145dc461eeace0701481ee64" width="1600" height="1000" data-path="snippets/image/opt-in-out-windows-6.png" />
    </Columns>
  </Step>

  <Step title="Update Application Installer" titleSize="h3">
    **<u>Install:</u>**

    1. Add the following text to your installation wizard under "License agreement":

    ```markdown theme={null}
    {App name} installs Bright Data components (no execution).
    You will be able to view the component details in full before you accept this offer, as well as being able to turn Bright Data on and off directly from the 'App Settings'. Read more about Bright Data's EULA here.
    ```

    2. Add step to deploy the following to your install directory:
       * `lum_sdk.dll`
       * `net_updater32.exe`
       * `Brd_config.json`
    3. Add step to execute Bright Data service installer during app installation (recommended, optional):
       * Process to start: `net_updater32.exe --install-ui APPID` It will show the consent screen and if agreed, install the service.
    4. Run `net_updater32.exe -h` in command prompt to see available `--dlg-` parameters, or set them in `brd_config.json`.
    5. Wait for the process to finish before proceeding.

    **<u>Uninstall:</u>**

    Add the following to your application's uninstall script:

    1. Make sure no process uses `lum_sdk.dll` (terminate your application).
    2. Uninstall Bright Data service and remove all SDK files by executing  `net_updater32.exe --uninstall APPID`.
    3. Wait for uninstall to finish before proceeding.

    **<u>Update:</u>**

    Add the following to your application's update script:

    1. Stop your application (which is using `lum_sdk.dll`).
    2. Stop Bright Data service: `luminati_net_updater_APPID`
       * Where APPID is your assigned APPID with . (dot) replaced with \_ (underscore).
       * Example: `win_abc.myapp.com` → `luminati_net_updater_win_abc_myapp_com`.
    3. Deploy new files:
       * `net_updater32.exe`
       * `lum_sdk.dll`
       * `Brd_config.json` your
    4. **Choose one option:**
       1. **Option A:** Install new `net_updater` : `net_updater32.exe --install-ui APPID` 
          * Shows consent to user (they can accept or decline).
          * Requires admin privileges.
          * Use `brd_config.json` for consent customization.
       2. **Option B:** Restart service if it exists
          * Does not require admin privileges.
          * Does not show consent.
  </Step>

  <Step title="Add SDK Service Status Notifications (Optional)" titleSize="h3">
    **Notifications**

    You can register your app for notifications about the SDK service status. This allows you to:

    * Know if the SDK is in a valid usable state.
    * Prevent users from receiving benefits until they restore the SDK service.

    **Implementation**

    Register a notification callback using the `brd_sdk_set_service_status_change_cb()` API. The callback function should be of the `brd_sdk_service_status_change_t` type.

    See `service_status_t` enum for more information on the different statuses.

    <Note>
      The callback function can be called from a different thread than the one used to register the callback.
    </Note>

    **Recovery**

    If the `service_status_t` is `SERVICE_STATUS_NOT_INSTALLED`, `SERVICE_STATUS_INSTALLED`, or `SERVICE_STATUS_NOT_RUNNING`, you can use the `brd_sdk_fix_service_status()` API to trigger automatic recovery.

    You can also trigger this on user action (e.g., "Click here to fix Bright Data SDK and regain benefit").
  </Step>

  <Step title="Custom Consent Screen (Optional)" titleSize="h3">
    <CustomConsentWin platform="win" />
  </Step>

  <Step title="Self-Check Your Integration" titleSize="h3">
    **Testing Mode**

    You may set `BrightData.Api.Settings.TestMode = true` while developing. This way the BrightData service will not be installed when you accept the consent screen, making it easier to develop.

    **Resetting During Testing**

    While testing, you can:

    1. **Opt-out through settings**
       * Remove Bright Data service by opting out through your application settings.
       * Delete the `luminati` folder (or your entire output folder).
       * This resets your consent choice.
       * Consent screen will display next time you run the application.
    2. **Uninstall via command**
       * Execute `net_updater32.exe --uninstall APPID` in your output folder.
       * This deletes all SDK files.

    <Note>
      Self-check using an emulator/simulator is not yet supported. Currently, self-check can only be performed on a real device.
    </Note>

    <Note>
      **If the SDK isn't initializing / peer not connecting:**

      1. Verify the correct App ID is used, confirm the SDK service is running.
      2. Check there aren't multiple SDK apps running from the same IP — that can interfere.
      3. If nothing helps, check with our team.
    </Note>
  </Step>

  <Step title="Update Your Terms of Service" titleSize="h3">
    Bright Data ensures users are fully informed about joining the peer network.

    **Add the following text to your Terms of Service web page (TOS, EULA, or Privacy Policy):**

    *In return for premium features of '\[Your App Name]', you may choose to be a peer on the Bright Data network. By doing so, you agree to have read and accepted the [Bright SDK EULA](https://bright-sdk.com/eula) and [Bright Data's Privacy Policy](https://bright-sdk.com/privacy-policy).*

    *You may opt out of the Bright Data network by \[add clear opt-out instructions].*

    **Requirements:**

    1. Include all text and links as provided above.
    2. Any additional Bright SDK-related content must be shared during the app review process for approval.
  </Step>

  <Step title="Submit Your Integration for Review" titleSize="h3">
    <SubmitIntegrationReview />
  </Step>

  <Step title="How to Update SDK" titleSize="h3">
    <AccordionGroup>
      <Accordion title="Option A - Using the Integration CLI Tool (Recommended)">
        Run the tool with the `--update` flag. It will automatically fetch and replace the SDK files in place without losing your config or consent flow settings:

        ```bash theme={null}
        npx github:BrightSDK/bright-sdk-integration --platform windows --update
        ```
      </Accordion>

      <Accordion title="Option B - Manual">
        1. Download the latest SDK using the [Bright SDK downloader](https://brightsdk.github.io/bright-sdk-downloader-rs/).
        2. Replace the following files with the newer versions:
           * `net_updater32.exe` (or `net_updater64.exe`)
           * `lum_sdk.dll` (or `lum_sdk32.dll` / `lum_sdk64.dll` for C/C++)
           * `brd_config.json`
        3. Clean and rebuild your project.
      </Accordion>
    </AccordionGroup>
  </Step>

  <Step title="Code Example" titleSize="h3">
    ```cpp theme={null}
    #include "lum_sdk.h"

    void WINAPI brd_choice_change_cb(int choice)
    {
        if (choice == LUM_SDK_CHOICE_PEER)
        {
            // user agreed to Bright Data consent
            // you can disable ads here, for example
        }
        else
        {
            // user disagreed to the consent or opted out
            // you can enable ads here, for example
        }
    }

    void WINAPI brd_service_status_change_cb(int status)
    {
        if (!brd_sdk_get_consent_choice())
            return;
        if (status == SERVICE_STATUS_NOT_INSTALLED)
        {
            // optional: notify user about SDK service not installed and offer to recover
            // optional: automatically try and recover (might cause bad UX)
            if (userWantsToRecover || autoRecoverIsEnabled)
                brd_sdk_fix_service_status();
        }
        else if (status == SERVICE_STATUS_INSTALLED || status == SERVICE_STATUS_NOT_RUNNING)
        {
            // optional: notify user about SDK service not running and offer to recover
            // optional: automatically try and recover (might cause bad UX)
            if (userWantsToRecover || autoRecoverIsEnabled)
                brd_sdk_fix_service_status();
        }
    }

    int _tmain(int argc, _TCHAR* argv[])
    {
        brd_sdk_set_appid("APPID_GOES_HERE");
        brd_sdk_set_app_name("APP_NAME_GOES_HERE");
        brd_sdk_set_logo_link("URL_TO_YOUR_APP_LOGO_GOES_HERE");
        brd_sdk_set_choice_change_cb(brd_choice_change_cb);
        brd_sdk_set_service_status_change_cb(brd_service_status_change_cb);
        brd_sdk_init();

        // run your application
        brd_sdk_close();
        return 0;
    }
    ```
  </Step>

  <Step title="API Documentation" titleSize="h3">
    * Settings in `brd_config.json` are shared by both `lum_sdk.dll` and `net_updater32.exe`.
    * You can use the config file together with the programmatic API.
    * Programmatic API settings take precedence over config file settings.

    <AccordionGroup>
      <Accordion title="Configuration File (brd_config.json)">
        **Required Properties**

        | **Property** | **Type** | **Description**                                              |
        | :----------- | :------- | :----------------------------------------------------------- |
        | `app_id`     | string   | Your APPID                                                   |
        | `app_name`   | string   | Friendly name of your app that appears on the consent screen |
        | `logo_link`  | string   | URL to your app's logo for the consent screen                |

        **Optional Properties**

        | Property       | Type   | Description                                                                                                                                             |
        | :------------- | :----- | :------------------------------------------------------------------------------------------------------------------------------------------------------ |
        | `benefit`      | string | Description of benefits user gets when enabling SDK. Changes consent screen wording. Becomes the first part of the first sentence on the consent screen |
        | `agree_btn`    | string | Text of the consent screen's agree button                                                                                                               |
        | `disagree_btn` | string | Text of the consent screen's disagree button                                                                                                            |
        | `opt_out_txt`  | string | Text of the consent screen's opt-out instructions                                                                                                       |
      </Accordion>

      <Accordion title="C++ API Reference">
        **Core Methods**

        | **Method**                  | **Description**                                                                                                                                                                                                                                                      |
        | :-------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
        | `brd_sdk_init()`            | Initializes Bright SDK. Should be called during app initialization. All other methods will be accessible afterwards. By default, consent screen will be shown if the user hasn't made a choice yet, but can be skipped with `brd_sdk_set_skip_consent_on_init(TRUE)` |
        | `brd_sdk_show_consent()`    | Displays consent screen. (Clears user choice and removes Brightdata service if installed.) Can be used when a user tries to close an ad or clicks the checkbox to activate Bright SDK                                                                                |
        | `brd_sdk_opt_out()`         | Disables Bright SDK and removes Brightdata service. Consent choice will change to `LUM_SDK_CHOICE_NOT_PEER`                                                                                                                                                          |
        | `brd_sdk_close()`           | Closes Bright SDK. Should be called when the application exits if the SDK cannot automatically detect the application exit and keeps running, keeping the app process running                                                                                        |
        | `char * brd_sdk_get_uuid()` | Returns the peer's unique identifier. Useful for debugging                                                                                                                                                                                                           |

        **Properties**

        | **Method**                         | **Description**                                                      | **Return Values**                                                                                                                       |
        | :--------------------------------- | :------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------- |
        | `int brd_sdk_get_consent_choice()` | Returns the user's consent choice                                    | LUM\_SDK\_CHOICE\_NONE (=0) - no choice yet<br />LUM\_SDK\_CHOICE\_PEER (=1) - agreed<br />LUM\_SDK\_CHOICE\_NOT\_PEER (=2) - disagreed |
        | `int brd_sdk_is_supported()`       | Return whether machine supports minimum .NET version required to run |                                                                                                                                         |

        **Callbacks**

        | **Method**                                                       | **Description**                                                                                                                                                                               |
        | :--------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
        | `brd_sdk_set_choice_change_cb(brd_sdk_choice_change_t cb)`       | Sets a callback function that is invoked when the user's consent choice has changed. For example when they accepted the consent or they disabled Bright SDK through your application settings |
        | `brd_sdk_set_on_dialog_shown_cb(brd_sdk_on_dialog_shown_t cb)`   | Sets a callback function that is invoked when the consent dialog is shown                                                                                                                     |
        | `brd_sdk_set_on_dialog_closed_cb(brd_sdk_on_dialog_closed_t cb)` | Sets a callback function that is invoked when the consent dialog is closed                                                                                                                    |
      </Accordion>

      <Accordion title="Configuration Methods">
        **Required Settings**

        | **Method**                               | **Description**                                                                                                      |
        | :--------------------------------------- | :------------------------------------------------------------------------------------------------------------------- |
        | `brd_sdk_set_appid(char *appid)`         | Your APPID. Required if not provided in `brd_config.json` file                                                       |
        | `brd_sdk_set_app_name(char *app_name)`   | Friendly name of your app that will appear on the consent screen. Required if not provided in `brd_config.json` file |
        | `brd_sdk_set_logo_link(char *logo_link)` | URL to your app's logo that will appear on the consent screen. Required if not provided in `brd_config.json` file    |

        **Basic Configuration**

        | **Method**                                               | **Description**                                                                                                                                                                                                   |
        | :------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
        | `brd_sdk_set_skip_consent_on_init(BOOLEAN skip_consent)` | If TRUE, init method will not show consent screen. The consent screen can be shown later with the `brd_sdk_show_consent` method. Default FALSE                                                                    |
        | `brd_sdk_set_benefit(char *benefit_txt)`                 | Description of the benefits a user gets if he/she consents to enable Bright SDK. Consent screen will have different wordings if set. The value will be the first part of the first sentence on the consent screen |
        | `brd_sdk_set_opt_out_txt(char *opt_out_txt)`             | Text of the consent screen's opt-out instructions                                                                                                                                                                 |
        | `brd_sdk_set_campaign(char *camp)`                       | Optional parameter for the further breakdown of the existing app ID to monitor the statistics separately                                                                                                          |

        **Localization**

        | **Method**                     | **Description**                                                                                                                      |
        | :----------------------------- | :----------------------------------------------------------------------------------------------------------------------------------- |
        | `brd_sdk_set_lang(char *lang)` | Language code for consent screen language. Default value: "en-US". Supported: en-US, de-De, es-Es, fr-FR, it-IT, pt-PT, ru-RU, zh-CN |

        **Visual Customization**

        | **Method**                                                         | **Description**                                                                  |
        | :----------------------------------------------------------------- | :------------------------------------------------------------------------------- |
        | `brd_sdk_set_txt_color(char *txt_color)`                           | Color of the consent text. Format: hex argb, "#AABBCCDD". Optional               |
        | `brd_sdk_set_app_name_color(char *app_name_color)`                 | Color of the application name text. Format: hex argb, "#AABBCCDD". Optional      |
        | `brd_sdk_set_bright_data_logo_color(char *bright_data_logo_color)` | Color of the BrightData logo background. Format: hex argb, "#AABBCCDD". Optional |
        | `brd_sdk_set_bg_color(char *bg_color)`                             | Background color of the consent screen. Format: hex argb, "#AABBCCDD". Optional  |
        | `brd_sdk_set_btn_color(char *btn_color)`                           | Button color of the consent screen. Format: hex argb, "#AABBCCDD". Optional      |
      </Accordion>

      <Accordion title="C API Reference">
        The same functions as above with a `_c` suffix, e.g., `brdsdk_init_c()`.
      </Accordion>

      <Accordion title="Command Line Tool (net_updater.exe)">
        `net_updater(32|64).exe` Command Line Arguments.

        **Help & Information**

        | **Argument** | **Description**            |
        | :----------- | :------------------------- |
        | `-h`         | Print command descriptions |

        **Service Management**

        | **Argument**            | **Description**                                                                      |
        | :---------------------- | :----------------------------------------------------------------------------------- |
        | `--install-ui appid`    | Install service with provided appid after showing dialog and getting user permission |
        | `--check-peer appid`    | Validate peer                                                                        |
        | `--uninstall appid`     | Remove service with provided appid (must match appid used during install)            |
        | `--start-service appid` | Starts Bright Data service                                                           |
        | `--stop-service appid`  | Stops Bright Data service                                                            |

        **Dialog Customization**

        | **Argument**              | **Description**                                                                                                                                                                                                   |
        | :------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
        | `--dlg-language culture`  | Language code for consent screen language. Default value: "en-US". Supported: en-US, de-De, es-Es, fr-FR, it-IT, pt-PT, ru-RU, zh-CN                                                                              |
        | `--dlg-app-name name`     | Friendly name of your app that will appear on the consent screen                                                                                                                                                  |
        | `--dlg-logo-link logo`    | URL to your app's logo that will appear on the consent screen                                                                                                                                                     |
        | `--dlg-benefit benefit`   | Description of the benefits a user gets if he/she consents to enable Bright SDK. Consent screen will have different wordings if set. The value will be the first part of the first sentence on the consent screen |
        | `--dlg-agree-btn text`    | Text of the consent screen's agree button                                                                                                                                                                         |
        | `--dlg-disagree-btn text` | Text of the consent screen's disagree button                                                                                                                                                                      |

        **Analytics**

        | **Argument**             | **Description**                                                                                          |
        | :----------------------- | :------------------------------------------------------------------------------------------------------- |
        | `--campaign campaign_id` | Optional parameter for the further breakdown of the existing app ID to monitor the statistics separately |
      </Accordion>
    </AccordionGroup>
  </Step>
</Steps>
