# Help with 2 missing files - CLASSES.CLW and CWAPI.INC

**URL:** <https://clarionhub.com/t/help-with-2-missing-files-classes-clw-and-cwapi-inc/8179>\
**Category:** questions\
**Created:** [May 17, 2025, 1:00am UTC](https://clarionhub.com/t/help-with-2-missing-files-classes-clw-and-cwapi-inc/8179 "2025-05-17T01:00:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bio](https://clarionhub.com/letter_avatar_proxy/v4/letter/b/919ad9/32.png) [@Bio](https://clarionhub.com/u/Bio)\
**Post date:** [May 17, 2025, 1:00am UTC](https://clarionhub.com/t/help-with-2-missing-files-classes-clw-and-cwapi-inc/8179/1 "2025-05-17T01:00:04Z")

</div>

Hello everyone, I urgently need two files that are corrupted in my Clarion 9.1 "CLASSES.CLW" and 'CWAPI.INC', Can someone help me please without them I can't finish my project, I've already reinstalled Clarion but it didn't help.

---

<div class="post-metadata">

**Author:** ![Bruce](https://clarionhub.com/letter_avatar_proxy/v4/letter/b/ccd318/32.png) [@Bruce](https://clarionhub.com/u/Bruce)\
**Post date:** [May 17, 2025, 1:03am UTC](https://clarionhub.com/t/help-with-2-missing-files-classes-clw-and-cwapi-inc/8179/2 "2025-05-17T01:03:44Z")

</div>

The reason re-installing Clarion did not help,is because those are not files shipped with Clarion. They’re likely files custom to your application, or perhaps files gotten from some 3rd party.

If someone recognises the files, perhaps they can tell you where they came from.

It’s also worth noting, that generally it’s not a great idea to be asking for files from the community at large. Most files are subject to some sort of copyright, so we encourage you to get the files direct from the copyright holder. So, for example, had these been part of Clarion I would have recommended contacting SoftVelocity to get them. If you don’t know the owner, then framing the question to determine the source is usually ideal.

---

<div class="post-metadata">

**Author:** ![Bio](https://clarionhub.com/letter_avatar_proxy/v4/letter/b/919ad9/32.png) [@Bio](https://clarionhub.com/u/Bio)\
**Post date:** [May 17, 2025, 1:22am UTC](https://clarionhub.com/t/help-with-2-missing-files-classes-clw-and-cwapi-inc/8179/3 "2025-05-17T01:22:00Z")

</div>

I appreciate your contact, friend Bruce. I believe that these are innocent files that do no harm to anyone. I know that there is a lot of protection around Clarion, but since these are just complementary files and not executable, there would be no problem. However, I am grateful for your attention.

---

<div class="post-metadata">

**Author:** ![Bruce](https://clarionhub.com/letter_avatar_proxy/v4/letter/b/ccd318/32.png) [@Bruce](https://clarionhub.com/u/Bruce)\
**Post date:** [May 17, 2025, 2:02am UTC](https://clarionhub.com/t/help-with-2-missing-files-classes-clw-and-cwapi-inc/8179/4 "2025-05-17T02:02:05Z")

</div>

As noted though, they’re not part of shipping Clarion.

Also, source files are generally copyrighted. Lots of Clarion (templates, classes etc) are shipped as source files, but copyright remains, so sharing files should be done with caution, regardless of their format.

But, as noted above, that’s not your current issue. Your current issue is that you need to know where these files have come from so you can get them. Once you know where they come from you can correspond with their author.

---

<div class="post-metadata">

**Author:** ![Bio](https://clarionhub.com/letter_avatar_proxy/v4/letter/b/919ad9/32.png) [@Bio](https://clarionhub.com/u/Bio)\
**Post date:** [May 17, 2025, 3:24pm UTC](https://clarionhub.com/t/help-with-2-missing-files-classes-clw-and-cwapi-inc/8179/5 "2025-05-17T15:24:01Z")

</div>

Okay, my friend Bruce, thank you for your guidance and clarification.  
Thank you very much.

---

<div class="post-metadata">

**Author:** ![CarlBarnes](https://clarionhub.com/user_avatar/clarionhub.com/carlbarnes/32/1859_2.png) [@CarlBarnes](https://clarionhub.com/u/CarlBarnes)\
**Post date:** [May 17, 2025, 7:48pm UTC](https://clarionhub.com/t/help-with-2-missing-files-classes-clw-and-cwapi-inc/8179/6 "2025-05-17T19:48:43Z")

</div>

> [@Bio](#):
>
> I urgently need two files that are corrupted in my Clarion 9.1 “CLASSES.CLW” and ‘CWAPI.INC’

I would expect if these files matter you would see various errors. With the CwApi.Inc probably Unresolved Externals.

Tell us what specific errors or problems you get when building?

---

<div class="post-metadata">

**Author:** ![Bio](https://clarionhub.com/letter_avatar_proxy/v4/letter/b/919ad9/32.png) [@Bio](https://clarionhub.com/u/Bio)\
**Post date:** [May 20, 2025, 1:11pm UTC](https://clarionhub.com/t/help-with-2-missing-files-classes-clw-and-cwapi-inc/8179/7 "2025-05-20T13:11:18Z")

</div>

Hello friend CarlBarnes  
I apologize for the delay in responding, but I was traveling.  
As I said before, these two files are just additions to a program. Since Clarion uses a type of RGB to HEX conversion, I am developing a ColorPicker that does this conversion so that we can use different colors without errors in the codes. So when I try to compile, at the end, it displays this message. It is not a code error, but rather a missing file. These are the two files I mentioned. But I have already solved this problem without these files. Thank you for contacting me.

**Here is a small part of the code**.

```clarion
MAP
  MODULE('WinAPI')
    ChooseColorA(*LONG),BOOL,PASCAL,RAW
  END
END

ColorData GROUP,TYPE
  lStructSize LONG
  hwndOwner LONG
  hInstance LONG
  rgbResult LONG
  lpCustColors LONG
  Flags LONG
  lCustData LONG
  lpfnHook LONG
  lpTemplateName LONG
END

ColorDataVar ColorData
CustColors LONG(16)

ColorDataVar.lStructSize = SIZE(ColorDataVar)
ColorDataVar.hwndOwner = 0
ColorDataVar.lpCustColors = ADDRESS(CustColors)
ColorDataVar.Flags = 1h

IF ChooseColorA(ColorDataVar)
  COL:Red = BAND(ColorDataVar.rgbResult,0FF0000h) / 65536
  COL:Green = BAND(ColorDataVar.rgbResult,000FF00h) / 256
  COL:Blue = BAND(ColorDataVar.rgbResult,00000FFh)
  COL:HEX = '#' & RIGHT('000000' & FORMAT(BAND(ColorDataVar.rgbResult,0FFFFFFh),@n06),6)
  COL:NomeCor = GetColorName(ColorDataVar.rgbResult)

  ?CorPreview{PROP:FILL} = ColorDataVar.rgbResult
  ?StrRGB{PROP:Text} = 'RGB: ' & COL:Red & ',' & COL:Green & ',' & COL:Blue
  ?StrHEX{PROP:Text} = 'HEX: ' & COL:HEX
  ?StrNome{PROP:Text} = 'Nome: ' & COL:NomeCor
END

```

---

<div class="post-metadata">

**Author:** ![CarlBarnes](https://clarionhub.com/user_avatar/clarionhub.com/carlbarnes/32/1859_2.png) [@CarlBarnes](https://clarionhub.com/u/CarlBarnes)\
**Post date:** [May 20, 2025, 5:31pm UTC](https://clarionhub.com/t/help-with-2-missing-files-classes-clw-and-cwapi-inc/8179/8 "2025-05-20T17:31:08Z")

</div>

> [@Bio](#):
>
> ```Clarion
> COL:Red = BAND(ColorDataVar.rgbResult,0FF0000h) / 65536
> COL:Green = BAND(ColorDataVar.rgbResult,000FF00h) / 256
> COL:Blue = BAND(ColorDataVar.rgbResult,00000FFh)
> 
> ```

IMO in the above code it would be best to use only Bitwise functions i.e. use BSHIFT rather than Divide e.g.

```Clarion
  COL:Red = BSHIFT( BAND(ColorDataVar.rgbResult,0FF0000h), -16 ) !was / 65536
  COL:Green = BSHIFT( BAND(ColorDataVar.rgbResult,000FF00h), -8 ) !was / 256
  COL:Blue = BAND(ColorDataVar.rgbResult,00000FFh)

```

You can test the Bitwise functions using my [Bit Mapper tool on GitHub](https://github.com/CarlTBarnes/Bit-Mapper). I usually want to verify I have BSHIFT with the right value. It should be easy to remember that a Negative Shift is Divide, but I usually double check. The Help on BSHIFT is good and shows a Divide.

 ![image](https://clarionhub-uploads.s3.eu-north-1.amazonaws.com/original/2X/c/cbec192a2287f4ae38be9abd49aa15440c1c8f74.png)

Above started with `FF0000h` and did `BSHIFT(,-16)` which shows the result is `0000FFh`. I think that’s what you were trying to do was just get the Red Bits.
