Get CollectionProperty in C

Hello
I want to get strings from specific property(CollectionProperty with specific name) in C code.
I found that function in rna_access.h

char *RNA_property_string_get_alloc(PointerRNA *ptr, PropertyRNA *prop, char *fixedbuf, int fixedlen, int *r_len)

which is called from native python code i want to go around this and use this func to get string from my specific property.
That extracts string from my CollectionProperty but i need to pass to him

PointerRNA *ptr, PropertyRNA *prop

are for that i need to create manual and how? is there any other way?

My problem is how to read CollectionProperty in my Custom Space in C ofc(just with property name?).

I not looking for detail explain i just need reference
If you know where in source exist that usage please refer me this will be very usefull

Thank you.

Hello, I see that no one answers than I guess the question a lot of vague so I’ll repeat it but with a more specific case where I’m stuck .
I copied bf_editor_space_outliner and made some small changes such as changing the name from the outliner in projoutliner (project outliner ) and everything works in a blender appears a new space that can be used and is identical to the Outliner.
Now I will give it to him my information and I think to do it in

projoutliner_tree.c / projoutliner_build_tree ( Main * mainvar , Scene * scene , SpaceOops * soops )

for start trying to get StringProperty(later ColectionProperty or some new ‘TreeProperty’ maybe) defined in Python with

bpy.types.Scene.ExampleString bpy.props.StringProperty = ()
bpy.types.Scene.ExampleString = ' This Is String For Exampleee !!'

I got some references from ideasman42 on IRC

 RNA_id_pointer_create ( scene .... & ptr ) ; 
RNA_string_get ( ptr , " my_string " )

How in this function , for example, to get that string ?

I made this.if someone need
void projoutliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
{

PointerRNA mainptr, obptr;
PropertyRNA *objects, *projSceneListProp;
RNA_main_pointer_create(mainvar, &mainptr);
objects = RNA_struct_find_property(&mainptr, “scenes”);
RNA_property_collection_lookup_string(&mainptr, objects, “Scene”, &obptr);
char *es[100];
RNA_string_get(&obptr, “name”, es);
//dsfds
projSceneListProp = RNA_struct_find_property(&obptr, “ProjectScenesList”);

PropertyRNA *pptr;
char *caaa = "fdsfdsfdsfdsfdsf";
RNA_PROP_BEGIN(&obptr, pptr, projSceneListProp)
{
    RNA_string_get(&pptr, "name", caaa);
    printf("adsas");
}RNA_PROP_END;

I made this.

void projoutliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
{
//
// some outliner codes
//
PointerRNA mainptr, obptr;
    PropertyRNA *objects, *projSceneListProp;
char *es[100];

    RNA_main_pointer_create(mainvar, &mainptr);
    objects = RNA_struct_find_property(&mainptr, "scenes");
    RNA_property_collection_lookup_string(&mainptr, objects, "Scene", &obptr);
    
    RNA_string_get(&obptr, "name", es);
    //dsfds
    projSceneListProp = RNA_struct_find_property(&obptr, "ProjectScenesList");
    PropertyRNA *pptr;
    char *caaa = "fdsfdsfdsfdsfdsf";
    RNA_PROP_BEGIN(&obptr, pptr, projSceneListProp)
    {
        RNA_string_get(&pptr, "name", caaa);
        printf("adsas");
    }RNA_PROP_END;

I made this here is code if someone stuck as i. The biggest problem for me was how to get to first pointer but that can be done from Scene or Context and sure have more…