Wraping a MKL handle in julia

According to your prescription, I have created a pointer of type Cvoid but my call giving me an error of no method matching. I am attaching my sample code here

I = [1, 4, 4, 5]; J = [1, 1, 2, 3]; V = [2.0, 1.0, 4.0, 6.0];
b=sparse(I,J,V);
p=Ptr{Cvoid}
ccall(("mkl_sparse_d_create_csc", librt),Cint (Ptr{Cvoid},Ptr{UInt8},
Ref{Cint},Ref{Cint},Ptr{Cint},Ptr{Cint},Ptr{Cint},Ptr{Float64}),
p,"SPARSE_INDEX_BASE_ONE",b.m,b.n,
b.colptr,pointer(b.colptr,2),b.rowval,b.nzval)
MethodError: no method matching unsafe_convert(::Type{Ptr{Nothing}}, ::Type{Ptr{Nothing}})
Closest candidates are:
  unsafe_convert(::Type{Ptr{Nothing}}, ::Base.RefValue{T}) where T at refvalue.jl:30
  unsafe_convert(::Type{Ptr{Nothing}}, ::Base.RefArray{T,A,R} where R where A<:(AbstractArray{T,N} where N)) where T at refpointer.jl:90
  unsafe_convert(::Type{Ptr{Nothing}}, ::Base.CFunction) at c.jl:36

I also looked into the python wrapper sparse_dot_mkl. I have tried to implement their logic for creating the matrix handle for the MKL routine, mkl_sparse_?_create_csc gives me the error -“The input parameters contain an invalid value”. I am showing a part of my code.

mutable struct sparse_matrix_t
end
I = [1, 4, 4, 5]; J = [1, 1, 2, 3]; V = [2.0, 1.0, 4.0, 6.0];
b=sparse(I,J,V);
d=sparse_matrix_t();
p=pointer_from_objref(d)
ccall(("mkl_sparse_d_create_csc", librt),Cint (Ptr{Cvoid},Ptr{UInt8},
Ref{Cint},Ref{Cint},Ptr{Cint},Ptr{Cint},Ptr{Cint},Ptr{Float64}),
p,"SPARSE_INDEX_BASE_ONE",b.m,b.n,
b.colptr,pointer(b.colptr,2),b.rowval,b.nzval);

the value of the pointer p does not change during the operation.